git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] t0020-crlf: check the right file

From
Jeff King <peff@peff.net>
Date
Aug 22, 2018, 16:30 UTC
Message-ID
<20180822163000.GB11904@sigill.intra.peff.net>
In-Reply-To
<xmqqo9du5qlf.fsf@gitster-ct.c.googlers.com>
On Wed, Aug 22, 2018 at 09:11:08AM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> This originates from fd777141 ("t0020: fix ignored exit code inside
> loops", 2015-03-25) where a loop
> 
>     for f in one dir/two
>     do
>             do things on "$f" || break
>     done
> 
> was unrolled to correctly break out of the &&-chain.  The filenames
> on the update-index line correctly copied one and dir/two, but the
> has_cr line somehow lost dir/ prefix.
> 
> Thanks.  Will queue.
Whoops, my error. Thanks for catching it.
Show 10 quoted lines
> > diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
> > index 5f056982a5..854da0ae16 100755
> > --- a/t/t0020-crlf.sh
> > +++ b/t/t0020-crlf.sh
> > @@ -160,7 +160,7 @@ test_expect_success 'checkout with autocrlf=input' '
> >  	git config core.autocrlf input &&
> >  	git read-tree --reset -u HEAD &&
> >  	test_must_fail has_cr one &&
> > -	test_must_fail has_cr two &&
> > +	test_must_fail has_cr dir/two &&

I think I'm also responsible for these mis-uses of test_must_fail, which probably ought to be "!".

-Peff
Previous: Junio C Hamano
Message 4 of 4 in “t0020-crlf: check the right file”
  1. 1/2 t0020-crlf: check the right fileSZEDER Gábor, Aug 22, 2018
  2. 2/2 t4051-diff-function-context: read the right fileSZEDER Gábor, Aug 22, 2018
  3. Junio C HamanoAug 22, 2018
  4. Jeff KingAug 22, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.