diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2018-02-28 12:21:08 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2018-02-28 12:21:08 +0100 |
commit | a554d588cc88694a88948b93ca8df6bfd8722e3a (patch) | |
tree | a9947bd72cb4be11fe3749f2572dcd6c1de7494a | |
parent | c9d59c6140fc365eb7ab950fb1a33187a949d403 (diff) | |
download | libgit2-a554d588cc88694a88948b93ca8df6bfd8722e3a.tar.gz |
tree: initialize the id we use for testing submodule insertionscmn/tree-write-initialise
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/object/tree/write.c b/tests/object/tree/write.c index 9690ec4d7..a1ee03d6d 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); |