diff mbox series

[v4,03/14] builtin/config: move "fixed-value" option to correct group

Message ID ddcd8031d7e399b126344d82d3373a2b2ed7fb8f.1714730169.git.ps@pks.im (mailing list archive)
State Superseded
Headers show
Series builtin/config: introduce subcommands | expand

Commit Message

Patrick Steinhardt May 3, 2024, 9:56 a.m. UTC
The `--fixed-value` option can be used to alter how the value-pattern
parameter is interpreted for the various submodes of git-config(1). But
while it is an option, it is currently listed as part of the submodes
group the command, which is wrong.

Move the option to the "Other" group, which hosts the various options
known to git-config(1).

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 builtin/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Karthik Nayak May 3, 2024, 12:28 p.m. UTC | #1
Patrick Steinhardt <ps@pks.im> writes:

> The `--fixed-value` option can be used to alter how the value-pattern
> parameter is interpreted for the various submodes of git-config(1). But
> while it is an option, it is currently listed as part of the submodes
> group the command, which is wrong.
>

Isn't it currently listed as part of the 'Action' group? Also I'm not
sure if the last sentence needs to be corrected here.

>
> Move the option to the "Other" group, which hosts the various options
> known to git-config(1).
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  builtin/config.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/config.c b/builtin/config.c
> index 59ae5996eb..054019b70c 100644
> --- a/builtin/config.c
> +++ b/builtin/config.c
> @@ -643,7 +643,6 @@ static struct option builtin_config_options[] = {
>  	OPT_BIT(0, "rename-section", &actions, N_("rename section: old-name new-name"), ACTION_RENAME_SECTION),
>  	OPT_BIT(0, "remove-section", &actions, N_("remove a section: name"), ACTION_REMOVE_SECTION),
>  	OPT_BIT('l', "list", &actions, N_("list all"), ACTION_LIST),
> -	OPT_BOOL(0, "fixed-value", &fixed_value, N_("use string equality when comparing values to 'value-pattern'")),
>  	OPT_BIT('e', "edit", &actions, N_("open an editor"), ACTION_EDIT),
>  	OPT_BIT(0, "get-color", &actions, N_("find the color configured: slot [default]"), ACTION_GET_COLOR),
>  	OPT_BIT(0, "get-colorbool", &actions, N_("find the color setting: slot [stdout-is-tty]"), ACTION_GET_COLORBOOL),
> @@ -663,6 +662,7 @@ static struct option builtin_config_options[] = {
>  	OPT_BOOL(0, "show-scope", &show_scope, N_("show scope of config (worktree, local, global, system, command)")),
>  	OPT_STRING(0, "default", &default_value, N_("value"), N_("with --get, use default value when missing entry")),
>  	OPT_STRING(0, "comment", &comment_arg, N_("value"), N_("human-readable comment string (# will be prepended as needed)")),
> +	OPT_BOOL(0, "fixed-value", &fixed_value, N_("use string equality when comparing values to 'value-pattern'")),
>  	OPT_END(),
>  };
>
> --
> 2.45.0
Patrick Steinhardt May 6, 2024, 9:34 a.m. UTC | #2
On Fri, May 03, 2024 at 05:28:38AM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > The `--fixed-value` option can be used to alter how the value-pattern
> > parameter is interpreted for the various submodes of git-config(1). But
> > while it is an option, it is currently listed as part of the submodes
> > group the command, which is wrong.
> >
> 
> Isn't it currently listed as part of the 'Action' group? Also I'm not
> sure if the last sentence needs to be corrected here.

It's what I actually intended to say, yes. But I agree with you that
"action" feels like the more reasonable way to put it given that we also
call them "actions" in code.

And yes, the last sentence needs to be corrected :)

Patrick

> >
> > Move the option to the "Other" group, which hosts the various options
> > known to git-config(1).
> >
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> > ---
> >  builtin/config.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/builtin/config.c b/builtin/config.c
> > index 59ae5996eb..054019b70c 100644
> > --- a/builtin/config.c
> > +++ b/builtin/config.c
> > @@ -643,7 +643,6 @@ static struct option builtin_config_options[] = {
> >  	OPT_BIT(0, "rename-section", &actions, N_("rename section: old-name new-name"), ACTION_RENAME_SECTION),
> >  	OPT_BIT(0, "remove-section", &actions, N_("remove a section: name"), ACTION_REMOVE_SECTION),
> >  	OPT_BIT('l', "list", &actions, N_("list all"), ACTION_LIST),
> > -	OPT_BOOL(0, "fixed-value", &fixed_value, N_("use string equality when comparing values to 'value-pattern'")),
> >  	OPT_BIT('e', "edit", &actions, N_("open an editor"), ACTION_EDIT),
> >  	OPT_BIT(0, "get-color", &actions, N_("find the color configured: slot [default]"), ACTION_GET_COLOR),
> >  	OPT_BIT(0, "get-colorbool", &actions, N_("find the color setting: slot [stdout-is-tty]"), ACTION_GET_COLORBOOL),
> > @@ -663,6 +662,7 @@ static struct option builtin_config_options[] = {
> >  	OPT_BOOL(0, "show-scope", &show_scope, N_("show scope of config (worktree, local, global, system, command)")),
> >  	OPT_STRING(0, "default", &default_value, N_("value"), N_("with --get, use default value when missing entry")),
> >  	OPT_STRING(0, "comment", &comment_arg, N_("value"), N_("human-readable comment string (# will be prepended as needed)")),
> > +	OPT_BOOL(0, "fixed-value", &fixed_value, N_("use string equality when comparing values to 'value-pattern'")),
> >  	OPT_END(),
> >  };
> >
> > --
> > 2.45.0
diff mbox series

Patch

diff --git a/builtin/config.c b/builtin/config.c
index 59ae5996eb..054019b70c 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -643,7 +643,6 @@  static struct option builtin_config_options[] = {
 	OPT_BIT(0, "rename-section", &actions, N_("rename section: old-name new-name"), ACTION_RENAME_SECTION),
 	OPT_BIT(0, "remove-section", &actions, N_("remove a section: name"), ACTION_REMOVE_SECTION),
 	OPT_BIT('l', "list", &actions, N_("list all"), ACTION_LIST),
-	OPT_BOOL(0, "fixed-value", &fixed_value, N_("use string equality when comparing values to 'value-pattern'")),
 	OPT_BIT('e', "edit", &actions, N_("open an editor"), ACTION_EDIT),
 	OPT_BIT(0, "get-color", &actions, N_("find the color configured: slot [default]"), ACTION_GET_COLOR),
 	OPT_BIT(0, "get-colorbool", &actions, N_("find the color setting: slot [stdout-is-tty]"), ACTION_GET_COLORBOOL),
@@ -663,6 +662,7 @@  static struct option builtin_config_options[] = {
 	OPT_BOOL(0, "show-scope", &show_scope, N_("show scope of config (worktree, local, global, system, command)")),
 	OPT_STRING(0, "default", &default_value, N_("value"), N_("with --get, use default value when missing entry")),
 	OPT_STRING(0, "comment", &comment_arg, N_("value"), N_("human-readable comment string (# will be prepended as needed)")),
+	OPT_BOOL(0, "fixed-value", &fixed_value, N_("use string equality when comparing values to 'value-pattern'")),
 	OPT_END(),
 };