summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2018-02-28 12:21:08 +0100
committerPatrick Steinhardt <ps@pks.im>2018-03-10 17:45:25 +0000
commit9e98f49d4bcad82d73d775e237397fdb30b5e3d5 (patch)
tree03cf59c26dd748a4b58cea679491290dbda53f90
parentc24b15c36f41b217e98b2aaa04845002f6066b20 (diff)
downloadlibgit2-9e98f49d4bcad82d73d775e237397fdb30b5e3d5.tar.gz
tree: initialize the id we use for testing submodule insertions
Instead of laving it uninitialized and relying on luck for it to be non-zero, let's give it a dummy hash so we make valgrind happy (in this case the hash comes from `sha1sum </dev/null`.
-rw-r--r--tests/object/tree/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/object/tree/write.c b/tests/object/tree/write.c
index a9decf9c1..3dd1cbfdb 100644
--- a/tests/object/tree/write.c
+++ b/tests/object/tree/write.c
@@ -495,6 +495,7 @@ static void test_inserting_submodule(void)
git_treebuilder *bld;
git_oid sm_id;
+ cl_git_pass(git_oid_fromstr(&sm_id, "da39a3ee5e6b4b0d3255bfef95601890afd80709"));
cl_git_pass(git_treebuilder_new(&bld, g_repo, NULL));
cl_git_pass(git_treebuilder_insert(NULL, bld, "sm", &sm_id, GIT_FILEMODE_COMMIT));
git_treebuilder_free(bld);