git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] doc: correct doc for glob pathspec
@ 2025-07-08  2:45 Russell Hanneken
  2025-07-08  2:45 ` [PATCH 1/1] " Russell Hanneken
  0 siblings, 1 reply; 5+ messages in thread
From: Russell Hanneken @ 2025-07-08  2:45 UTC (permalink / raw)
  To: git; +Cc: Russell Hanneken

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] doc: correct doc for glob pathspec
  2025-07-08  2:45 [PATCH 0/1] doc: correct doc for glob pathspec Russell Hanneken
@ 2025-07-08  2:45 ` Russell Hanneken
  2025-07-08  5:04   ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Russell Hanneken @ 2025-07-08  2:45 UTC (permalink / raw)
  To: git; +Cc: Russell Hanneken, Junio C Hamano

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] doc: correct doc for glob pathspec
  2025-07-08  2:45 ` [PATCH 1/1] " Russell Hanneken
@ 2025-07-08  5:04   ` Junio C Hamano
  2025-07-10 23:39     ` Russell Hanneken
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2025-07-08  5:04 UTC (permalink / raw)
  To: Russell Hanneken; +Cc: git

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] doc: correct doc for glob pathspec
  2025-07-08  5:04   ` Junio C Hamano
@ 2025-07-10 23:39     ` Russell Hanneken
  2025-07-21 13:08       ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 5+ messages in thread
From: Russell Hanneken @ 2025-07-10 23:39 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] doc: correct doc for glob pathspec
  2025-07-10 23:39     ` Russell Hanneken
@ 2025-07-21 13:08       ` Kristoffer Haugsbakk
  0 siblings, 0 replies; 5+ messages in thread
From: Kristoffer Haugsbakk @ 2025-07-21 13:08 UTC (permalink / raw)
  To: Russell Hanneken, Junio C Hamano; +Cc: git

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-21 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08  2:45 [PATCH 0/1] doc: correct doc for glob pathspec Russell Hanneken
2025-07-08  2:45 ` [PATCH 1/1] " Russell Hanneken
2025-07-08  5:04   ` Junio C Hamano
2025-07-10 23:39     ` Russell Hanneken
2025-07-21 13:08       ` Kristoffer Haugsbakk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).