diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Page a followed log by the name asked for
Each row of a followed log moves ctx.qry.vpath to the name its commit
knew the file by, and the pager built its links from that, so past a
rename both links named the old file and led to an empty page.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0103-log.sh | 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 9 insertions, 1 deletion
diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index 08f9ddd..ed92a76 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -46,7 +46,8 @@ test_expect_success 'no links with space in arg' '! grep "q=commit 1" tmp' test_expect_success 'commit 2 is not visible' '! grep "commit 2" tmp' # Following a file diffs each commit for the name the file had there, so the -# root commit that created it has to be diffed too. +# root commit that created it has to be diffed too, and paging has to go on +# asking about the name the visitor followed rather than the older one. test_expect_success 'set up a renamed file to follow' ' test_create_repo repos/fol && ( @@ -83,4 +84,11 @@ test_expect_success 'a followed log reaches the root commit' ' grep ">create a<" tmp ' +test_expect_success 'the pager of a followed log keeps the name followed' ' + CGIT_CONFIG="$PWD/folrc" QUERY_STRING="url=fol/log/b.txt&follow=1&ofs=3" cgit >tmp && + grep ">edit a 3<" tmp && + grep "href=./fol/log/b.txt?follow=1.>\[prev\]" tmp && + grep "href=./fol/log/b.txt?ofs=6&follow=1.>\[next\]" tmp +' + test_done |
