Commit 89091d36c47299ee374d50a278c7d676911f3e0d

Etienne Samson 2018-07-06T20:24:21

tests: fix a relative pathname issue The path given to `git_index_add_bypath` is relative to the root of the repository. That `describe/file` path is relative to the root of the sandbox directory, hence if I add the missing `cl_git_pass` I rightfully get an error that `$SANDBOX/describe/describe/file doesn't exist`. The path is thus changed to be made relative to the repository, which makes the failure go away and "restore" the test.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests/describe/t6120.c b/tests/describe/t6120.c
index d254de8..74f8f2e 100644
--- a/tests/describe/t6120.c
+++ b/tests/describe/t6120.c
@@ -104,7 +104,7 @@ static void commit_and_tag(
 
 	cl_git_append2file("describe/file", "\n");
 	
-	cl_git_pass(git_index_add_bypath(index, "describe/file"));
+	cl_git_pass(git_index_add_bypath(index, "file"));
 	cl_git_pass(git_index_write(index));
 
 	*time += 10;