diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-09-09 12:10:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-11 14:48:15 -0700 |
commit | 321459439e19517c412cab1cfbb64a2749f272c9 (patch) | |
tree | c554f8d87a9ba17218b7b96f4af7e18fd31eadfa /t | |
parent | cat-file --textconv/--filters: allow specifying the path separately (diff) | |
download | tgif-321459439e19517c412cab1cfbb64a2749f272c9.tar.xz |
cat-file: support --textconv/--filters in batch mode
With this patch, --batch can be combined with --textconv or --filters.
For this to work, the input needs to have the form
<object name><single white space><path>
so that the filters can be chosen appropriately.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t8010-cat-file-filters.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t8010-cat-file-filters.sh b/t/t8010-cat-file-filters.sh index 3d5ad7df98..d8242e467e 100755 --- a/t/t8010-cat-file-filters.sh +++ b/t/t8010-cat-file-filters.sh @@ -51,4 +51,14 @@ test_expect_success '--path=<path> complains without --textconv/--filters' ' grep "path.*needs.*filters" err ' +test_expect_success 'cat-file --textconv --batch works' ' + sha1=$(git rev-parse -q --verify HEAD:world.txt) && + test_config diff.txt.textconv "tr A-Za-z N-ZA-Mn-za-m <" && + printf "%s hello.txt\n%s hello\n" $sha1 $sha1 | + git cat-file --textconv --batch >actual && + printf "%s blob 6\nuryyb\r\n\n%s blob 6\nhello\n\n" \ + $sha1 $sha1 >expect && + test_cmp expect actual +' + test_done |