Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a554d58

Browse files
committed
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`.
1 parent c9d59c6 commit a554d58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/object/tree/write.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ static void test_inserting_submodule(void)
495495
git_treebuilder *bld;
496496
git_oid sm_id;
497497

498+
cl_git_pass(git_oid_fromstr(&sm_id, "da39a3ee5e6b4b0d3255bfef95601890afd80709"));
498499
cl_git_pass(git_treebuilder_new(&bld, g_repo, NULL));
499500
cl_git_pass(git_treebuilder_insert(NULL, bld, "sm", &sm_id, GIT_FILEMODE_COMMIT));
500501
git_treebuilder_free(bld);

0 commit comments

Comments
 (0)