diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Walk a path on the blob page from any commit the id names
With both an id and a path the blob page handed back the raw object
the id named, so a commit id gave the commit text itself, while the
plain page looked the path up in that commit's tree. A tag is peeled
to its commit on the way, and the README example of a pinned commit
now uses a form the request checks accept.
Diffstat (limited to '')
| -rwxr-xr-x | tests/t0303-robustness.sh | 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 15 insertions, 0 deletions
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 73c2ca5..5bdb060 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -246,6 +246,21 @@ test_expect_success 'the blob page reads a file through an annotated tag' ' test_cmp want body ' +# The plain page walks a path out of whatever commit the id names, and the +# blob page used to answer such a request with the raw commit object. +test_expect_success 'the blob page walks a path out of the commit or tag the id names' ' + tip=$(git -C repos/rob rev-parse HEAD) && + robq "url=rob/blob/file-1&id=$tip" >tmp && + strip_headers <tmp >body && + test_cmp want body && + tag=$(git -C repos/rob rev-parse ann) && + robq "url=rob/blob/file-1&id=$tag" >tmp && + strip_headers <tmp >body && + test_cmp want body && + robq "url=rob/blob/missing&id=$tip" >tmp && + grep "^Status: 404" tmp +' + test_expect_success 'the commit page shows a message whole when text follows its trailers' ' ( cd repos/rob && |
