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

Re: [PATCH] Documentation: improve description of --glob=pattern and friends

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 22, 2010, 00:51 UTC
Message-ID
<7v1vhjj72d.fsf@alter.siamese.dyndns.org>
In-Reply-To
<e2e992cfb93335b400fd9ec67c6d38cb0157b006.1264119524.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 12 quoted lines
> Consolidate the descriptions of --branches, --tags and --remotes a
> bit, to make it less repetitive.  Improve the grammar a bit, and spell
> out the meaning of the 'append /*' rule.
>
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> ---
>
> Compared to the earlier draft, I changed "it is anchored" (by
> appending '/*') to "it is turned into a prefix match", since this is
> not anchoring in the ^regex$ sense.  (I guess 'leading-component
> match' would be even more accurate, but that makes the sentence
> unwieldy in my ears.)

By the way, we may someday want to change that to do FNM_PATHNAME instead of just a flat glob.

Incidentally, that is why I prefer the earlier suggestion to do "check with memcmp() if it is a path-prefix, and if it fails, then give fnmatch(FNM_PATHNAME) a chance". That way, we don't have to say "by appending '/*'" (which is an implementation detail we can change).

It seems that the suggestion was ignored, though.
Previous: Thomas RastNext: Junio C Hamano
Message 9 of 12 in “rev-parse --glob”
  1. 1/2 rev-parse --globIlari Liusvaara, Jan 20, 2010
  2. 2/2 rev-parse --branches/--tags/--remotes=patternIlari Liusvaara, Jan 20, 2010
  3. Junio C HamanoJan 20, 2010
  4. Johannes SixtJan 21, 2010
  5. Michael J GruberJan 21, 2010
  6. Thomas RastJan 21, 2010
  7. Junio C HamanoJan 21, 2010
  8. Documentation: improve description of --glob=pattern and friendsThomas Rast, Jan 22, 2010
  9. Junio C HamanoJan 22, 2010
  10. Junio C HamanoJan 21, 2010
  11. Junio C HamanoJan 20, 2010
  12. Ilari LiusvaaraJan 20, 2010

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.