diff mbox series

[v2,1/1] git-config.1: remove value from positional args in unset usage

Message ID 20241008142920.570244-2-joshiheinrichs@gmail.com (mailing list archive)
State Accepted
Commit f36b8cbaefd8ba0f815ff05a79ddda3ee814a09f
Headers show
Series Remove value from position args in config unset usage | expand

Commit Message

Josh Heinrichs Oct. 8, 2024, 2:29 p.m. UTC
The synopsis for `git config unset` mentions two positional arguments:
`<name>` and `<value>`. While the first argument is correct, the second
is not. Users are expected to provide the value via `--value=<value>`.

Remove the positional argument. The `--value=<value>` option is already
documented correctly, so this is all we need to do to fix the
documentation.

Signed-off-by: Josh Heinrichs <joshiheinrichs@gmail.com>
---
 Documentation/git-config.txt | 2 +-
 builtin/config.c             | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Junio C Hamano Oct. 8, 2024, 6:20 p.m. UTC | #1
Josh Heinrichs <joshiheinrichs@gmail.com> writes:

> The synopsis for `git config unset` mentions two positional arguments:
> `<name>` and `<value>`. While the first argument is correct, the second
> is not. Users are expected to provide the value via `--value=<value>`.
>
> Remove the positional argument. The `--value=<value>` option is already
> documented correctly, so this is all we need to do to fix the
> documentation.
>
> Signed-off-by: Josh Heinrichs <joshiheinrichs@gmail.com>
> ---
>  Documentation/git-config.txt | 2 +-
>  builtin/config.c             | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Patrick, do you mind to forge your Reviewed-by for this one?

Will queue.  Thanks, both.

> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 7f81fbbea8..3e420177c1 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -12,7 +12,7 @@ SYNOPSIS
>  'git config list' [<file-option>] [<display-option>] [--includes]
>  'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>
>  'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>
> -'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> <value>
> +'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>
>  'git config rename-section' [<file-option>] <old-name> <new-name>
>  'git config remove-section' [<file-option>] <name>
>  'git config edit' [<file-option>]
> diff --git a/builtin/config.c b/builtin/config.c
> index 97e4d5f57c..d60e106bd6 100644
> --- a/builtin/config.c
> +++ b/builtin/config.c
> @@ -19,7 +19,7 @@ static const char *const builtin_config_usage[] = {
>  	N_("git config list [<file-option>] [<display-option>] [--includes]"),
>  	N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>"),
>  	N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
> -	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
> +	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
>  	N_("git config rename-section [<file-option>] <old-name> <new-name>"),
>  	N_("git config remove-section [<file-option>] <name>"),
>  	N_("git config edit [<file-option>]"),
> @@ -43,7 +43,7 @@ static const char *const builtin_config_set_usage[] = {
>  };
>  
>  static const char *const builtin_config_unset_usage[] = {
> -	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
> +	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
>  	NULL
>  };
Patrick Steinhardt Oct. 9, 2024, 3:37 a.m. UTC | #2
On Tue, Oct 08, 2024 at 11:20:48AM -0700, Junio C Hamano wrote:
> Josh Heinrichs <joshiheinrichs@gmail.com> writes:
> 
> > The synopsis for `git config unset` mentions two positional arguments:
> > `<name>` and `<value>`. While the first argument is correct, the second
> > is not. Users are expected to provide the value via `--value=<value>`.
> >
> > Remove the positional argument. The `--value=<value>` option is already
> > documented correctly, so this is all we need to do to fix the
> > documentation.
> >
> > Signed-off-by: Josh Heinrichs <joshiheinrichs@gmail.com>
> > ---
> >  Documentation/git-config.txt | 2 +-
> >  builtin/config.c             | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> Patrick, do you mind to forge your Reviewed-by for this one?
> 
> Will queue.  Thanks, both.

No, please feel free to add it.

    Reviewed-by: Patrick Steinhardt <ps@pks.im>

Patrick
diff mbox series

Patch

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 7f81fbbea8..3e420177c1 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -12,7 +12,7 @@  SYNOPSIS
 'git config list' [<file-option>] [<display-option>] [--includes]
 'git config get' [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>
 'git config set' [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>
-'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> <value>
+'git config unset' [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>
 'git config rename-section' [<file-option>] <old-name> <new-name>
 'git config remove-section' [<file-option>] <name>
 'git config edit' [<file-option>]
diff --git a/builtin/config.c b/builtin/config.c
index 97e4d5f57c..d60e106bd6 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -19,7 +19,7 @@  static const char *const builtin_config_usage[] = {
 	N_("git config list [<file-option>] [<display-option>] [--includes]"),
 	N_("git config get [<file-option>] [<display-option>] [--includes] [--all] [--regexp] [--value=<value>] [--fixed-value] [--default=<default>] <name>"),
 	N_("git config set [<file-option>] [--type=<type>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
-	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
+	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
 	N_("git config rename-section [<file-option>] <old-name> <new-name>"),
 	N_("git config remove-section [<file-option>] <name>"),
 	N_("git config edit [<file-option>]"),
@@ -43,7 +43,7 @@  static const char *const builtin_config_set_usage[] = {
 };
 
 static const char *const builtin_config_unset_usage[] = {
-	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name> <value>"),
+	N_("git config unset [<file-option>] [--all] [--value=<value>] [--fixed-value] <name>"),
 	NULL
 };