Re: [PATCH] Clear --exclude list after 'git rev-parse --all'
- From
Jeff King <peff@peff.net>
- Date
- Oct 27, 2018, 07:20 UTC
- Message-ID
- <20181027072056.GA26545@sigill.intra.peff.net>
- In-Reply-To
- <xmqq5zxnc17b.fsf@gitster-ct.c.googlers.com>
On Sat, Oct 27, 2018 at 04:12:40PM +0900, Junio C Hamano wrote:
Show 24 quoted lines
> > Yeah, I agree that would be fine, too. I think there are two dimensions > > in which to look at the problem, like so: > > > > rev-list rev-parse > > -------- --------- > > --glob clears clears > > --all clears does not clear > > > > Testing either the row or the column (or both) works for me. :) > > OK, so let's not leave this loose end untied. This may be good > enough to squash in. > [...] > +test_expect_success 'rev-parse --branches clears --exclude' ' > + compare rev-parse "--exclude=* --branches --branches" "--branches" > +' > + > +test_expect_success 'rev-parse --tags clears --exclude' ' > + compare rev-parse "--exclude=* --tags --tags" "--tags" > +' > + > +test_expect_success 'rev-parse --all clears --exclude' ' > + compare rev-parse "--exclude=* --all --all" "--all" > +'
Yes, this looks good to me. In theory a more intricate test might catch other kinds of bugs (e.g., a more limited exclude and making sure it was applied correctly in each place), but I don't think it's really worth the effort.
-Peff