Skip to content

Commit

Permalink
test-repository: properly init repo
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
derrickstolee authored and gitster committed Aug 21, 2018
1 parent 950c62b commit b775896
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions t/helper/test-repository.c
Expand Up @@ -15,7 +15,10 @@ static void test_parse_commit_in_graph(const char *gitdir, const char *worktree,
struct commit *c;
struct commit_list *parent;

repo_init(&r, gitdir, worktree);
setup_git_env(gitdir);

if (repo_init(&r, gitdir, worktree))
die("Couldn't init repo");

c = lookup_commit(&r, commit_oid);

Expand All @@ -38,7 +41,10 @@ static void test_get_commit_tree_in_graph(const char *gitdir,
struct commit *c;
struct tree *tree;

repo_init(&r, gitdir, worktree);
setup_git_env(gitdir);

if (repo_init(&r, gitdir, worktree))
die("Couldn't init repo");

c = lookup_commit(&r, commit_oid);

Expand Down

0 comments on commit b775896

Please sign in to comment.