failing tests

larsh at larsh at
Thu Jul 21 13:23:44 CEST 2011

[The mailing list software tends to remove attachments, but as list
admin I got it anyways]

Looking at your trash/tmp, it seems that the line

  root=$(cd trash/repos/foo && git rev-list --reverse HEAD | head -1)

in actually returns two lines: the absolute path of the
foo test repo followed by a newline and the root commit sha1.

Does your `cd` return the path you just changed into? If so, how can we make
it stop? Like this?

diff --git a/tests/ b/tests/
index ae794c8..5a59188 100755
--- a/tests/
+++ b/tests/
@@ -20,7 +20,8 @@ run_test 'find diff summary' '
 run_test 'get root commit' '
-	 root=$(cd trash/repos/foo && git rev-list --reverse HEAD | head -1) &&
+	 root=$(cd trash/repos/foo >/dev/null 2>&1 &&
+	        git rev-list --reverse HEAD | head -1) &&
 	 cgit_url "foo/commit&id=$root" >trash/tmp &&
 	 grep "</html>" trash/tmp


More information about the CGit mailing list