summaryrefslogtreecommitdiff
path: root/t/t8007-cat-file-textconv.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2013-05-10 17:10:13 +0200
committerJunio C Hamano <gitster@pobox.com>2013-05-10 10:27:16 -0700
commit3ac21617b0f56dd76be3bbaa663bf0fff7f3095d (patch)
tree48d11779889306fce02c2bfc3acd5f5ddf603d94 /t/t8007-cat-file-textconv.sh
parent083b99310978c6768d8e954c9bab1d3692a515a1 (diff)
downloadgit-3ac21617b0f56dd76be3bbaa663bf0fff7f3095d.tar.gz
cat-file: do not die on --textconv without textconv filters
When a command is supposed to use textconv filters (by default or with "--textconv") and none are configured then the blob is output without conversion; the only exception to this rule is "cat-file --textconv". Make it behave like the rest of textconv aware commands. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t8007-cat-file-textconv.sh')
-rwxr-xr-xt/t8007-cat-file-textconv.sh20
1 files changed, 5 insertions, 15 deletions
diff --git a/t/t8007-cat-file-textconv.sh b/t/t8007-cat-file-textconv.sh
index 78a0085e64..83c663678f 100755
--- a/t/t8007-cat-file-textconv.sh
+++ b/t/t8007-cat-file-textconv.sh
@@ -22,11 +22,11 @@ test_expect_success 'setup ' '
'
cat >expected <<EOF
-fatal: git cat-file --textconv: unable to run textconv on :one.bin
+bin: test version 2
EOF
test_expect_success 'no filter specified' '
- git cat-file --textconv :one.bin 2>result
+ git cat-file --textconv :one.bin >result &&
test_cmp expected result
'
@@ -36,10 +36,6 @@ test_expect_success 'setup textconv filters' '
git config diff.test.cachetextconv false
'
-cat >expected <<EOF
-bin: test version 2
-EOF
-
test_expect_success 'cat-file without --textconv' '
git cat-file blob :one.bin >result &&
test_cmp expected result
@@ -73,25 +69,19 @@ test_expect_success 'cat-file --textconv on previous commit' '
'
test_expect_success SYMLINKS 'cat-file without --textconv (symlink)' '
+ printf "%s" "one.bin" >expected &&
git cat-file blob :symlink.bin >result &&
- printf "%s" "one.bin" >expected
test_cmp expected result
'
test_expect_success SYMLINKS 'cat-file --textconv on index (symlink)' '
- ! git cat-file --textconv :symlink.bin 2>result &&
- cat >expected <<\EOF &&
-fatal: git cat-file --textconv: unable to run textconv on :symlink.bin
-EOF
+ git cat-file --textconv :symlink.bin >result &&
test_cmp expected result
'
test_expect_success SYMLINKS 'cat-file --textconv on HEAD (symlink)' '
- ! git cat-file --textconv HEAD:symlink.bin 2>result &&
- cat >expected <<EOF &&
-fatal: git cat-file --textconv: unable to run textconv on HEAD:symlink.bin
-EOF
+ git cat-file --textconv HEAD:symlink.bin >result &&
test_cmp expected result
'