threads / patch / 61131

patch, 2 partsdocs: clarify file options in git-config `--edit`

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

## tl;dr

4 messages between Mar 16, 2024 and Mar 21, 2024. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Brian Lyles· Mar 16, 2024, 05:01 UTC · lore

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.

Signed-off-by: Brian Lyles <brianmlyles@gmail.com>
---
 Documentation/git-config.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to Documentation/git-config.txt +2 −1
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index dff39093b5..6876803253 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -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
-- 
2.43.0
Brian Lyles· Mar 16, 2024, 05:01 UTC · re: Brian Lyles · lore

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

Signed-off-by: Brian Lyles <brianmlyles@gmail.com>
---
 Documentation/git-config.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git-config.txt +1 −1
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 6876803253..a6e82b871b 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -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
 -------------
-- 
2.43.0
Patrick Steinhardt· Mar 21, 2024, 10:00 UTC · re: Brian Lyles · lore

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

On Sat, Mar 16, 2024 at 12:01:24AM -0500, Brian Lyles wrote:
Show 10 quoted lines
> 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.
> 
> Signed-off-by: Brian Lyles <brianmlyles@gmail.com>

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
Show 22 quoted lines
> ---
>  Documentation/git-config.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index dff39093b5..6876803253 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -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
> -- 
> 2.43.0
> 
> 
Junio C Hamano· Mar 21, 2024, 16:23 UTC · re: Patrick Steinhardt · lore

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

Patrick Steinhardt <ps@pks.im> writes:
Show 17 quoted lines
> On Sat, Mar 16, 2024 at 12:01:24AM -0500, Brian Lyles wrote:
>> 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.
>> 
>> Signed-off-by: Brian Lyles <brianmlyles@gmail.com>
>
> 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.
Show 23 quoted lines
>
>> ---
>>  Documentation/git-config.txt | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
>> index dff39093b5..6876803253 100644
>> --- a/Documentation/git-config.txt
>> +++ b/Documentation/git-config.txt
>> @@ -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
>> -- 
>> 2.43.0
>> 
>> 

← back to recent threads