Re: [PATCH 1/6] t4030: demonstrate behavior of show with textconv
- From
Jeff King <peff@peff.net>
- Date
- Apr 20, 2013, 04:04 UTC
- Message-ID
- <20130420040400.GA24970@sigill.intra.peff.net>
- In-Reply-To
- <a3162a9df3055532a818db264f43abc994325049.1366389739.git.git@drmicha.warpmail.net>
On Fri, Apr 19, 2013 at 06:44:44PM +0200, Michael J Gruber wrote:
> "git show <commit>" obeys the textconc setting while "git show <blob>" > does not. Demonstrate this in the test.
s/textconc/textconv
Show 13 quoted lines
> diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh > index 53ec330..f314ced 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 > +'
Makes sense.
Show 5 quoted lines
> +test_expect_success 'show blob produces binary' ' > + git show HEAD:file >actual && > + printf "\\0\\n\\1\\n" >expect && > + test_cmp expect actual > +'
I think this is probably the right thing. I can see instances where one would want the converted contents, but we have "cat-file --textconv" for that.
-Peff