diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Give a repository without a path no age
The index built its paths from a NULL repo.path, which the C library
prints as "(null)", so it looked for refs under that name in the working
directory.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0303-robustness.sh | 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 10 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index d2bf79f..cbb4cdc 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -37,6 +37,16 @@ test_expect_success 'a repository without a path answers 404' ' done ' +# The index dates a repository from files under its path, and one without a +# path has none, whatever sits in the working directory. +test_expect_success 'a repository without a path has no age on the index' ' + mkdir -p "(null)/refs/heads" && + >"(null)/refs/heads/master" && + CGIT_CONFIG="$PWD/nopathrc" QUERY_STRING="url=" cgit >tmp && + grep "</html>" tmp && + ! grep "<time " tmp +' + test_expect_success 'a repository with an empty url is skipped with a warning' ' { echo "virtual-root=/" && |
