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