Skip to contentSkip to conversation

docs: clarify file options in git-config `--edit`

PATCH In review Brian Lyles 3 participants 4 messages Mar 16, 2024 – Mar 21, 2024 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 docs: clarify file options in git-config `--edit`

The description for the -e/--edit option references scopes
inconsistently: system and global are referenced by their option name (--system/--global), but repository (--local is not. Additionally, neither --worktree nor --file are referenced at all, despite also being a valid options.

Update the description to mention all four available scopes as well as --file, referencing each consistently by their option name.

---
 Documentation/git-config.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/git-config.txt +2 -1
index dff39093b5..6876803253 100644
@@ -275,7 +275,8 @@ Valid `<type>`'s include:
 -e::
 --edit::
 	Opens an editor to modify the specified config file; either
-	`--system`, `--global`, or repository (default).
+	`--system`, `--global`, `--local` (default), `--worktree`, or
+	`--file <config-file>`.
 
 --[no-]includes::
 	Respect `include.*` directives in config files when looking up
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 docs: fix typo in git-config `--default`

---
 Documentation/git-config.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/git-config.txt +1 -1
index 6876803253..a6e82b871b 100644
@@ -286,7 +286,7 @@ Valid `<type>`'s include:
 
 --default <value>::
   When using `--get`, and the requested variable is not found, behave as if
-  <value> were the value assigned to the that variable.
+  <value> were the value assigned to that variable.
 
 CONFIGURATION
 -------------
Signature · 1 line
2.43.0
#2 lore raw
In reply to Brian Lyles
Quoted 10 lines · Brian Lyles

The description for the -e/--edit option references scopes
inconsistently: system and global are referenced by their option name (--system/--global), but repository (--local is not. Additionally, neither --worktree nor --file are referenced at all, despite also being a valid options.

Update the description to mention all four available scopes as well as --file, referencing each consistently by their option name.

I know that this series has been merged to next already, but as it didn't get any on-list review I just wanted to mention that this series looks good to me.

Patrick

Quoted 22 lines
---
 Documentation/git-config.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/git-config.txt +2 -1
index dff39093b5..6876803253 100644
@@ -275,7 +275,8 @@ Valid `<type>`'s include:
 -e::
 --edit::
 	Opens an editor to modify the specified config file; either
-	`--system`, `--global`, or repository (default).
+	`--system`, `--global`, `--local` (default), `--worktree`, or
+	`--file <config-file>`.
 
 --[no-]includes::
 	Respect `include.*` directives in config files when looking up
Signature · 1 line
2.43.0
#3 lore raw
Quoted 10 lines · Patrick Steinhardt
Quoted 9 lines · Brian Lyles

The description for the -e/--edit option references scopes
inconsistently: system and global are referenced by their option name (--system/--global), but repository (--local is not. Additionally, neither --worktree nor --file are referenced at all, despite also being a valid options.

Update the description to mention all four available scopes as well as --file, referencing each consistently by their option name.

Quoted 7 lines
Quoted 1 line

I know that this series has been merged to next already, but as it didn't get any on-list review I just wanted to mention that this series looks good to me.

Patrick

Yeah, thanks, both of you.

Quoted 23 lines
Quoted 23 lines
---
 Documentation/git-config.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/git-config.txt +2 -1
index dff39093b5..6876803253 100644
@@ -275,7 +275,8 @@ Valid `<type>`'s include:
 -e::
 --edit::
 	Opens an editor to modify the specified config file; either
-	`--system`, `--global`, or repository (default).
+	`--system`, `--global`, `--local` (default), `--worktree`, or
+	`--file <config-file>`.
 
 --[no-]includes::
 	Respect `include.*` directives in config files when looking up
Signature · 1 line
2.43.0