{"thread":{"id":"64008","subject":"[PATCH] config: document includeIf conditions consistently","startedAt":"2025-08-21T15:06:56Z","lastAt":"2025-08-21T15:06:56Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"524660","messageId":"xmqqldnc4stv.fsf@gitster.g","threadId":"64008","inReplyTo":null,"subject":"[PATCH] config: document includeIf conditions consistently","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-21T15:06:52Z","receivedAt":"2025-08-21T15:06:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When 399b1984 (config: include file if remote URL matches a glob,\n2022-01-18) added the 'hasconfig:remote.*.url:<URL>' condition to be\nused in the \"includeIf.<condition>.path\" configuration, the keyword\nwas added with an extra colon in the documentation.\n\nThe section that documents these condition begins with this preamble:\n\n    The condition starts with a keyword followed by a colon and some data\n    whose format and meaning depends on the keyword. Supported keywords\n    are:\n\nwhich makes it clear that the colon that comes between the condition\nkeyword (e.g. \"gitdir\") and the parameter (aka \"some data\") is not\na part of the keyword.\n\nLose the extra colon.  Also rewrite description of all keywords to\nclarify that \"some data\" does not directly follow \"keyword\", and the\ncolon is not a part of keyword.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config.adoc | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git c/Documentation/config.adoc w/Documentation/config.adoc\nindex cc769251be..05f1ca7293 100644\n--- c/Documentation/config.adoc\n+++ w/Documentation/config.adoc\n@@ -114,8 +114,7 @@ whose format and meaning depends on the keyword. Supported keywords\n are:\n \n `gitdir`::\n-\n-\tThe data that follows the keyword `gitdir:` is used as a glob\n+\tThe data that follows the keyword `gitdir` and a colon is used as a glob\n \tpattern. If the location of the .git directory matches the\n \tpattern, the include condition is met.\n +\n@@ -148,7 +147,7 @@ refer to linkgit:gitignore[5] for details. For convenience:\n \tcase-insensitively (e.g. on case-insensitive file systems)\n \n `onbranch`::\n-\tThe data that follows the keyword `onbranch:` is taken to be a\n+\tThe data that follows the keyword `onbranch` and a colon is taken to be a\n \tpattern with standard globbing wildcards and two additional\n \tones, `**/` and `/**`, that can match multiple path components.\n \tIf we are in a worktree where the name of the branch that is\n@@ -161,8 +160,8 @@ all branches that begin with `foo/`. This is useful if your branches are\n organized hierarchically and you would like to apply a configuration to\n all the branches in that hierarchy.\n \n-`hasconfig:remote.*.url:`::\n-\tThe data that follows this keyword is taken to\n+`hasconfig:remote.*.url`::\n+\tThe data that follows this keyword and a colon is taken to\n \tbe a pattern with standard globbing wildcards and two\n \tadditional ones, `**/` and `/**`, that can match multiple\n \tcomponents. The first time this keyword is seen, the rest of\n"}]}