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

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
Previous: Junio C Hamano
Message 10 of 10 in “Clear --exclude list after 'git rev-parse --all'”
  1. Clear --exclude list after 'git rev-parse --all'Andreas Gruenbacher, Oct 23, 2018
  2. Junio C HamanoOct 24, 2018
  3. Andreas GruenbacherOct 24, 2018
  4. Junio C HamanoOct 24, 2018
  5. Andreas GruenbacherOct 24, 2018
  6. Jeff KingOct 25, 2018
  7. Junio C HamanoOct 25, 2018
  8. Jeff KingOct 26, 2018
  9. Junio C HamanoOct 27, 2018
  10. Jeff KingOct 27, 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.