diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Add `max-patch-count` to bound the patch view
Diffstat (limited to 'tests/t0108-patch.sh')
| -rwxr-xr-x | tests/t0108-patch.sh | 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 13 insertions, 0 deletions
diff --git a/tests/t0108-patch.sh b/tests/t0108-patch.sh index 18973bb..ffcba96 100755 --- a/tests/t0108-patch.sh +++ b/tests/t0108-patch.sh @@ -59,4 +59,17 @@ test_expect_success 'compare with output of git-format-patch(1)' ' test_cmp tmp_ tmp2 ' +test_expect_success 'max-patch-count bounds a patch range' ' + { + echo "cache-size=0" && + echo "max-patch-count=2" && + echo "repo.url=foo" && + echo "repo.path=$PWD/repos/foo/.git" + } >patchcountrc && + id=$(git --git-dir="$PWD/repos/foo/.git" rev-parse HEAD) && + root=$(git --git-dir="$PWD/repos/foo/.git" rev-list --max-parents=0 HEAD) && + CGIT_CONFIG="$PWD/patchcountrc" QUERY_STRING="url=foo/patch&id=$id&id2=$root" cgit >tmp && + test $(grep -c "^From " tmp) -eq 2 +' + test_done |
