From ef90ab66e8eaa863777a8d383c5af2ff43a426d2 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 28 Oct 2012 08:27:12 -0400 Subject: 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 --- t/t4030-diff-textconv.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 't') diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh index 461d27ac2..53ec330ce 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(-) -- cgit v1.2.1