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

Re: [PATCH 2/2] describe: Exclude --all --match=PATTERN

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2013, 21:15 UTC
Message-ID
<7vfw0cb2xi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130303205232.GL22203@biohazard-cafe.mit.edu>
Greg Price <price@MIT.EDU> writes:
Show 23 quoted lines
> On Wed, Feb 27, 2013 at 12:20:07PM -0800, Junio C Hamano wrote:
>> Without "--all" the command considers only the annotated tags to
>> base the descripion on, and with "--all", a ref that is not
>> annotated tags can be used as a base, but with a lower priority (if
>> an annotated tag can describe a given commit, that tag is used).
>> 
>> So naïvely I would expect "--all" and "--match" to base the
>> description on refs that match the pattern without limiting the
>> choice of base to annotated tags, and refs that do not match the
>> given pattern should not appear even as the last resort.  It appears
>> to me that the current situation is (3).
>
> Hmm.  It seems to me that "--all" says two things:
>
>  (a) allow unannotated (rather than only annotated)
>
>  (b) allow refs of any name (rather than only tags)
>
> With "--match", particularly because the pattern always refers only to
> tags, (b) is obliterated, and your proposed semantics are (a) plus a
> sort of inverse of (b):
>
>  (c) allow only refs matching the pattern

I would think it is more like "only (a), without changing the documented semantics of what '--all' and '--match' are by adding (b) or (c)".

I do not think in the longer term it is wrong per-se to change the semantics of "--match" from the documented "Only consider tags matching the pattern" to "Only consider refs matching the pattern", and such a change can and should be made as a separate patch "describe: loosen --match to allow any ref, not just tags" on top of the patch I sent which was meant to be bugfix-only.

Previous: Greg PriceNext: Greg Price
Message 5 of 6 in “describe: Exclude --all --match=PATTERN”
  1. 2/2 describe: Exclude --all --match=PATTERNGreg Price, Feb 25, 2013
  2. Junio C HamanoFeb 27, 2013
  3. Junio C HamanoFeb 28, 2013
  4. Greg PriceMar 3, 2013
  5. Junio C HamanoMar 3, 2013
  6. Greg PriceMar 3, 2013

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.