From: Jason Karns <jason.karns@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] Suspected with double asterisk in conditional include pattern
Date: Thu, 14 Mar 2019 13:30:43 -0400 [thread overview]
Message-ID: <CAKNmmv26G05GO7hG9bNvMsjpuUMHZRA+2f94TuG2wDNUwNhHkw@mail.gmail.com> (raw)
Hello,
I believe I've encountered a bug regarding the use of double asterisk
( /**/ ) within includeIf patterns.
git-config man pages state that
**/ and /**, that can match multiple path components
They then refer to the gitignore man pages which further define
supported wildcard patterns:
A slash followed by two consecutive asterisks then a slash matches
zero or more directories.
For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
My understanding of these docs are that the pattern
`/usr/local/**/Homebrew/` ought to match
both`/usr/local/cache/Homebrew/foo` and `/usr/local/Homebrew/foo`.
However, given the following conditional include rule:
[includeIf "gitdir:/usr/local/**/Homebrew/"]
The external config file is successfully included while in repo
`/usr/local/cache/Homebrew/foo` but NOT `/usr/local/Homebrew/foo`.
If I change the pattern to `**/Homebrew/**`, then the pattern matches
both desired repos. So it would seem that the `/**/` does not match 0
directories when the pattern begins with a slash.
Thank you,
Jason
next reply other threads:[~2019-03-14 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 17:30 Jason Karns [this message]
2019-03-22 19:04 ` [BUG] Suspected with double asterisk in conditional include pattern Taylor Blau
2019-03-23 3:45 ` [PATCH] config: correct '**' matching in includeIf patterns Nguyễn Thái Ngọc Duy
2019-03-24 12:56 ` Junio C Hamano
2019-03-24 13:17 ` [PATCH v2] " Nguyễn Thái Ngọc Duy
2019-03-25 2:30 ` Junio C Hamano
2019-03-25 21:40 ` Johannes Schindelin
2019-03-26 9:41 ` [PATCH v3] " Nguyễn Thái Ngọc Duy
2019-04-30 22:07 ` Jason Karns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKNmmv26G05GO7hG9bNvMsjpuUMHZRA+2f94TuG2wDNUwNhHkw@mail.gmail.com \
--to=jason.karns@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).