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

5 messages from 2025-07-08 to 2025-07-21. Participants: Russell Hanneken, Junio C Hamano, Kristoffer Haugsbakk.
Thread: https://gitlist.dev/t/63756

## Russell Hanneken, 2025-07-08 02:45

Subject: [PATCH 0/1] doc: correct doc for glob pathspec
Message-ID: <20250708024507.62386-1-rhanneken@pobox.com>
URL: https://gitlist.dev/e/20250708024507.62386-1-rhanneken%40pobox.com

```
gitglossary(7) documents Git pathspecs, including "glob" pathspecs,
prefixed by the magic word "glob". It states, incorrectly, that the glob
pattern "**/foo" is equivalent to "foo".

I suspect this incorrect statement is the result of copying and pasting
from gitignore(5).

This patch removes the incorrect statement.

Russell Hanneken (1):
  doc: correct doc for glob pathspec

 Documentation/glossary-content.adoc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


base-commit: 16bd9f20a403117f2e0d9bcda6c6e621d3763e77
-- 
2.34.1


```

## Russell Hanneken, 2025-07-08 02:45

Subject: [PATCH 1/1] doc: correct doc for glob pathspec
Message-ID: <20250708024507.62386-2-rhanneken@pobox.com>
URL: https://gitlist.dev/e/20250708024507.62386-2-rhanneken%40pobox.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


```

## Junio C Hamano, 2025-07-08 05:04

Subject: Re: [PATCH 1/1] doc: correct doc for glob pathspec
Message-ID: <xmqqikk3xog6.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqikk3xog6.fsf%40gitster.g
In-Reply-To: <20250708024507.62386-2-rhanneken@pobox.com>

```
Russell Hanneken <rhanneken@pobox.com> writes:

>   - 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`".

So, the change is that the explanation that the pattern `foo` would
match the same as what `**/foo` matches, i.e. a file or directory
whose name is `foo`, either at the top-level or in any subdirectory.

Sounds correct.

Will queue.  Thanks.

```

## Russell Hanneken, 2025-07-10 23:39

Subject: Re: [PATCH 1/1] doc: correct doc for glob pathspec
Message-ID: <DB8RSNI6D2D8.2OCZSLRSIFP55@pobox.com>
URL: https://gitlist.dev/e/DB8RSNI6D2D8.2OCZSLRSIFP55%40pobox.com
In-Reply-To: <xmqqikk3xog6.fsf@gitster.g>

```
On Tue Jul 8, 2025 at 1:05 AM EDT, Junio C Hamano wrote:
>
> Will queue.  Thanks.

Was there something wrong with my patch? I haven't seen my change appear
in the repository.

Regards,

Russell Hanneken
rhanneken@pobox.com


```

## Kristoffer Haugsbakk, 2025-07-21 13:08

Subject: Re: [PATCH 1/1] doc: correct doc for glob pathspec
Message-ID: <2f8ed9f4-5aff-486a-90c2-dce7f7116ae9@app.fastmail.com>
URL: https://gitlist.dev/e/2f8ed9f4-5aff-486a-90c2-dce7f7116ae9%40app.fastmail.com
In-Reply-To: <DB8RSNI6D2D8.2OCZSLRSIFP55@pobox.com>

```
On Fri, Jul 11, 2025, at 01:39, Russell Hanneken wrote:
> On Tue Jul 8, 2025 at 1:05 AM EDT, Junio C Hamano wrote:
>>
>> Will queue.  Thanks.
>
> Was there something wrong with my patch? I haven't seen my change appear
> in the repository.

See [here], `rh/doc-glob-pathspec-fix`.  It’s currently on the `next`
branch and will be merged to `master` next.

[here]: https://lore.kernel.org/git/xmqqo6ti49fk.fsf@gitster.g/

```
