summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2018-08-20 18:24:24 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-21 10:22:50 -0700
commitb7758963424e238b9152f0c9991325ff7fdffff1 (patch)
tree51fd13feb648a9628f7ce108ee12b156658c1703
parentcommit-graph: update design document (diff)
downloadtgif-b7758963424e238b9152f0c9991325ff7fdffff1.tar.xz
test-repository: properly init repo
Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--t/helper/test-repository.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c
index 2762ca6562..6a84a53efb 100644
--- a/t/helper/test-repository.c
+++ b/t/helper/test-repository.c
@@ -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,
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);