diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-12-28 10:40:58 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-12-28 10:40:58 -0800 |
| commit | b9fbc04e26fcc2c7ba6dda32512b3726d31e4beb (patch) | |
| tree | d160a4832769b9f4733c8ecaf93e7eb565a37b2a /t/helper/test-repository.c | |
| parent | Git 2.20 (diff) | |
| parent | t/helper/test-repository: celebrate independence from the_repository (diff) | |
| download | git-b9fbc04e26fcc2c7ba6dda32512b3726d31e4beb.tar.gz git-b9fbc04e26fcc2c7ba6dda32512b3726d31e4beb.zip | |
Merge branch 'sb/more-repo-in-api' into md/list-objects-filter-by-depth
Diffstat (limited to 't/helper/test-repository.c')
| -rw-r--r-- | t/helper/test-repository.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c index 6a84a53efb..f7f8618445 100644 --- a/t/helper/test-repository.c +++ b/t/helper/test-repository.c @@ -17,6 +17,11 @@ static void test_parse_commit_in_graph(const char *gitdir, const char *worktree, setup_git_env(gitdir); + memset(the_repository, 0, sizeof(*the_repository)); + + /* TODO: Needed for temporary hack in hashcmp, see 183a638b7da. */ + repo_set_hash_algo(the_repository, GIT_HASH_SHA1); + if (repo_init(&r, gitdir, worktree)) die("Couldn't init repo"); @@ -43,6 +48,11 @@ static void test_get_commit_tree_in_graph(const char *gitdir, setup_git_env(gitdir); + memset(the_repository, 0, sizeof(*the_repository)); + + /* TODO: Needed for temporary hack in hashcmp, see 183a638b7da. */ + repo_set_hash_algo(the_repository, GIT_HASH_SHA1); + if (repo_init(&r, gitdir, worktree)) die("Couldn't init repo"); |
