summaryrefslogtreecommitdiff
path: root/t/t4030-diff-textconv.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:03:12 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-11-20 10:03:12 -0800
commit35cae74c4d38b79ca80f6e62761f64fa67e8e609 (patch)
treed6c8286f4dbe8346ab81d4e198b6cf7367b4ee84 /t/t4030-diff-textconv.sh
parentMerge branch 'js/format-2047' into maint (diff)
parentdiff_grep: use textconv buffers for add/deleted files (diff)
downloadtgif-35cae74c4d38b79ca80f6e62761f64fa67e8e609.tar.xz
Merge branch 'jk/maint-diff-grep-textconv' into maint
"git diff -G<pattern>" did not honor textconv filter when looking for changes. * jk/maint-diff-grep-textconv: diff_grep: use textconv buffers for add/deleted files
Diffstat (limited to 't/t4030-diff-textconv.sh')
-rwxr-xr-xt/t4030-diff-textconv.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh
index eebb1eed8b..461d27ac20 100755
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
@@ -84,6 +84,18 @@ test_expect_success 'status -v produces text' '
git reset --soft HEAD@{1}
'
+test_expect_success 'grep-diff (-G) operates on textconv data (add)' '
+ echo one >expect &&
+ git log --root --format=%s -G0 >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'grep-diff (-G) operates on textconv data (modification)' '
+ echo two >expect &&
+ git log --root --format=%s -G1 >actual &&
+ test_cmp expect actual
+'
+
cat >expect.stat <<'EOF'
file | Bin 2 -> 4 bytes
1 file changed, 0 insertions(+), 0 deletions(-)