From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>
Subject: [PATCH] config: document includeIf conditions consistently
Date: Thu, 21 Aug 2025 08:06:52 -0700 [thread overview]
Message-ID: <xmqqldnc4stv.fsf@gitster.g> (raw)
When 399b1984 (config: include file if remote URL matches a glob,
2022-01-18) added the 'hasconfig:remote.*.url:<URL>' condition to be
used in the "includeIf.<condition>.path" configuration, the keyword
was added with an extra colon in the documentation.
The section that documents these condition begins with this preamble:
The condition starts with a keyword followed by a colon and some data
whose format and meaning depends on the keyword. Supported keywords
are:
which makes it clear that the colon that comes between the condition
keyword (e.g. "gitdir") and the parameter (aka "some data") is not
a part of the keyword.
Lose the extra colon. Also rewrite description of all keywords to
clarify that "some data" does not directly follow "keyword", and the
colon is not a part of keyword.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/config.adoc | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git c/Documentation/config.adoc w/Documentation/config.adoc
index cc769251be..05f1ca7293 100644
--- c/Documentation/config.adoc
+++ w/Documentation/config.adoc
@@ -114,8 +114,7 @@ whose format and meaning depends on the keyword. Supported keywords
are:
`gitdir`::
-
- The data that follows the keyword `gitdir:` is used as a glob
+ The data that follows the keyword `gitdir` and a colon is used as a glob
pattern. If the location of the .git directory matches the
pattern, the include condition is met.
+
@@ -148,7 +147,7 @@ refer to linkgit:gitignore[5] for details. For convenience:
case-insensitively (e.g. on case-insensitive file systems)
`onbranch`::
- The data that follows the keyword `onbranch:` is taken to be a
+ The data that follows the keyword `onbranch` and a colon is taken to be a
pattern with standard globbing wildcards and two additional
ones, `**/` and `/**`, that can match multiple path components.
If we are in a worktree where the name of the branch that is
@@ -161,8 +160,8 @@ all branches that begin with `foo/`. This is useful if your branches are
organized hierarchically and you would like to apply a configuration to
all the branches in that hierarchy.
-`hasconfig:remote.*.url:`::
- The data that follows this keyword is taken to
+`hasconfig:remote.*.url`::
+ The data that follows this keyword and a colon is taken to
be a pattern with standard globbing wildcards and two
additional ones, `**/` and `/**`, that can match multiple
components. The first time this keyword is seen, the rest of
reply other threads:[~2025-08-21 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqldnc4stv.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
/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.
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).