Browse Source

test-repository: properly init repo

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Derrick Stolee 7 years ago committed by Junio C Hamano
parent
commit
b775896342
  1. 10
      t/helper/test-repository.c

10
t/helper/test-repository.c

@ -15,7 +15,10 @@ static void test_parse_commit_in_graph(const char *gitdir, const char *worktree, @@ -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);

@ -38,7 +41,10 @@ static void test_get_commit_tree_in_graph(const char *gitdir, @@ -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);


Loading…
Cancel
Save