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

[PATCH 1/1] doc: correct doc for glob pathspec

From
Russell Hanneken <rhanneken@pobox.com>
Date
Jul 8, 2025, 02:45 UTC
Message-ID
<20250708024507.62386-2-rhanneken@pobox.com>
In-Reply-To
<20250708024507.62386-1-rhanneken@pobox.com>

gitglossary documents Git pathspecs. One type of pathspec is the "glob" pathspec, prefixed with the magic word "glob".

Regarding glob pathspecs, gitglossary says, '"**/foo" matches file or directory "foo" anywhere, the same as pattern "foo".' That last phrase ('the same as pattern "foo") is incorrect. "**/foo" and "foo" are not equivalent. "**/foo" matches foo anywhere, but "foo" does not.

This change removes the incorrect phrase from the glob pathspec doc.
Signed-off-by: Russell Hanneken <rhanneken@pobox.com>
---
 Documentation/glossary-content.adoc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/glossary-content.adoc b/Documentation/glossary-content.adoc
index 575c18f776..e423e4765b 100644
--- a/Documentation/glossary-content.adoc
+++ b/Documentation/glossary-content.adoc
@@ -418,9 +418,8 @@ full pathname may have special meaning:
 
  - A leading "`**`" followed by a slash means match in all
    directories. For example, "`**/foo`" matches file or directory
-   "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
-   matches file or directory "`bar`" anywhere that is directly
-   under directory "`foo`".
+   "`foo`" anywhere. "`**/foo/bar`" matches file or directory "`bar`"
+   anywhere that is directly under directory "`foo`".
 
  - A trailing "`/**`" matches everything inside. For example,
    "`abc/**`" matches all files inside directory "abc", relative
-- 
2.34.1
Previous: Russell HannekenNext: Junio C Hamano
Message 2 of 5 in “doc: correct doc for glob pathspec”
  1. 0/1 doc: correct doc for glob pathspecRussell Hanneken, Jul 8, 2025
  2. 1/1 doc: correct doc for glob pathspecRussell Hanneken, Jul 8, 2025
  3. Junio C HamanoJul 8, 2025
  4. Russell HannekenJul 10, 2025
  5. Kristoffer HaugsbakkJul 21, 2025

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.