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>
This commit is contained in:
@ -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(-)
|
||||
|
Reference in New Issue
Block a user