grep: honor --textconv for the case rev:path

Make "grep" honor the "--textconv" option also for the object case, i.e.
when used with an argument "rev:path".

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael J Gruber
2013-05-10 17:10:16 +02:00
committed by Junio C Hamano
parent 335ec3bf41
commit afa15f3cd8
4 changed files with 29 additions and 16 deletions

View File

@ -170,14 +170,10 @@ test_expect_success 'grep --no-textconv does not honor textconv' '
test_must_fail git grep --no-textconv Qfile
'
test_expect_failure 'grep --textconv blob honors textconv' '
test_expect_success 'grep --textconv blob honors textconv' '
echo "HEAD:a:binaryQfile" >expect &&
git grep --textconv Qfile HEAD:a >actual &&
test_cmp expect actual
'
test_expect_success 'grep --no-textconv blob does not honor textconv' '
test_must_fail git grep --no-textconv Qfile HEAD:a
'
test_done