summaryrefslogtreecommitdiff
path: root/t/t4030-diff-textconv.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-10-28 12:27:12 (GMT)
committerJeff King <peff@peff.net>2012-10-28 12:48:17 (GMT)
commitef90ab66e8eaa863777a8d383c5af2ff43a426d2 (patch)
treeed782976f7a4269e1107aa2cf4b462000d4fefa2 /t/t4030-diff-textconv.sh
parent8fa4b09fb14339c5d62e65a88fde8b220cb1591b (diff)
downloadgit-ef90ab66e8eaa863777a8d383c5af2ff43a426d2.zip
git-ef90ab66e8eaa863777a8d383c5af2ff43a426d2.tar.gz
git-ef90ab66e8eaa863777a8d383c5af2ff43a426d2.tar.bz2
pickaxe: use textconv for -S counting
We currently just look at raw blob data when using "-S" to pickaxe. This is mostly historical, as pickaxe predates the textconv feature. If the user has bothered to define a textconv filter, it is more likely that their search string will be on the textconv output, as that is what they will see in the diff (and we do not even provide a mechanism for them to search for binary needles that contain NUL characters). This patch teaches "-S" to use textconv, just as we already do for "-G". Signed-off-by: Jeff King <peff@peff.net>
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 461d27a..53ec330 100755
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
@@ -96,6 +96,18 @@ test_expect_success 'grep-diff (-G) operates on textconv data (modification)' '
test_cmp expect actual
'
+test_expect_success 'pickaxe (-S) operates on textconv data (add)' '
+ echo one >expect &&
+ git log --root --format=%s -S0 >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'pickaxe (-S) operates on textconv data (modification)' '
+ echo two >expect &&
+ git log --root --format=%s -S1 >actual &&
+ test_cmp expect actual
+'
+
cat >expect.stat <<'EOF'
file | Bin 2 -> 4 bytes
1 file changed, 0 insertions(+), 0 deletions(-)