Re: [PATCHv2 1/7] t4030: demonstrate behavior of show with textconv
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 23, 2013, 15:11 UTC
- Message-ID
- <7vehe1l1sh.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <8a6cbd3ca4e2cb1e5376262c3efa8e3a222767de.1366718624.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> "git show <commit>" honors the textconv setting while "git show <blob>" > does not. Demonstrate this in the test.
Should "git show <blob>" run textconv by default? I somehow had an impression that people were against it during the discussion on the previous round.
Show 36 quoted lines
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
> t/t4030-diff-textconv.sh | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh
> index 53ec330..260ea92 100755
> --- a/t/t4030-diff-textconv.sh
> +++ b/t/t4030-diff-textconv.sh
> @@ -58,6 +58,12 @@ test_expect_success 'diff produces text' '
> test_cmp expect.text actual
> '
>
> +test_expect_success 'show commit produces text' '
> + git show HEAD >diff &&
> + find_diff <diff >actual &&
> + test_cmp expect.text actual
> +'
> +
> test_expect_success 'diff-tree produces binary' '
> git diff-tree -p HEAD^ HEAD >diff &&
> find_diff <diff >actual &&
> @@ -84,6 +90,12 @@ test_expect_success 'status -v produces text' '
> git reset --soft HEAD@{1}
> '
>
> +test_expect_failure 'show blob produces text' '
> + git show HEAD:file >actual &&
> + printf "0\\n1\\n" >expect &&
> + test_cmp expect actual
> +'
> +
> test_expect_success 'grep-diff (-G) operates on textconv data (add)' '
> echo one >expect &&
> git log --root --format=%s -G0 >actual &&