failing tests

larsh at hjemli.net larsh at hjemli.net
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 t0105-commit.sh 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/t0105-commit.sh b/tests/t0105-commit.sh
index ae794c8..5a59188 100755
--- a/tests/t0105-commit.sh
+++ b/tests/t0105-commit.sh
@@ -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
 '


--
larsh




More information about the CGit mailing list