Skip to contentSkip to conversation

config: fix short help of unset flags

PATCH In review René Scharfe 3 participants 3 messages Nov 24, 2025 – Dec 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: fix short help of unset flags

The flags --all and --value of "git config unset" don't make the command "replace" or "show" anything, they are about selecting what to unset. Change their help text accordingly.

---
 builtin/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
builtin/config.c +2 -2
index 86e0cd77f3..80107e61dd 100644
@@ -1003,8 +1003,8 @@ static int cmd_config_unset(int argc, const char **argv, const char *prefix,
 	struct option opts[] = {
 		CONFIG_LOCATION_OPTIONS(location_opts),
 		OPT_GROUP(N_("Filter")),
-		OPT_BIT(0, "all", &flags, N_("replace multi-valued config option with new value"), CONFIG_FLAGS_MULTI_REPLACE),
-		OPT_STRING(0, "value", &value_pattern, N_("pattern"), N_("show config with values matching the pattern")),
+		OPT_BIT(0, "all", &flags, N_("unset all multi-valued config options"), CONFIG_FLAGS_MULTI_REPLACE),
+		OPT_STRING(0, "value", &value_pattern, N_("pattern"), N_("unset multi-valued config options with matching values")),
 		OPT_BIT(0, "fixed-value", &flags, N_("use string equality when comparing values to value pattern"), CONFIG_FLAGS_FIXED_VALUE),
 		OPT_END(),
 	};
Signature · 1 line
2.52.0
#1 lore raw
Quoted 3 lines · René Scharfe

The flags --all and --value of "git config unset" don't make the command "replace" or "show" anything, they are about selecting what to unset. Change their help text accordingly.

Good eyes. Perfectly makes sense. Will queue. Thanks.

Quoted 21 lines
---
 builtin/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
builtin/config.c +2 -2
index 86e0cd77f3..80107e61dd 100644
@@ -1003,8 +1003,8 @@ static int cmd_config_unset(int argc, const char **argv, const char *prefix,
 	struct option opts[] = {
 		CONFIG_LOCATION_OPTIONS(location_opts),
 		OPT_GROUP(N_("Filter")),
-		OPT_BIT(0, "all", &flags, N_("replace multi-valued config option with new value"), CONFIG_FLAGS_MULTI_REPLACE),
-		OPT_STRING(0, "value", &value_pattern, N_("pattern"), N_("show config with values matching the pattern")),
+		OPT_BIT(0, "all", &flags, N_("unset all multi-valued config options"), CONFIG_FLAGS_MULTI_REPLACE),
+		OPT_STRING(0, "value", &value_pattern, N_("pattern"), N_("unset multi-valued config options with matching values")),
 		OPT_BIT(0, "fixed-value", &flags, N_("use string equality when comparing values to value pattern"), CONFIG_FLAGS_FIXED_VALUE),
 		OPT_END(),
 	};
#2 lore raw
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · René Scharfe

The flags --all and --value of "git config unset" don't make the command "replace" or "show" anything, they are about selecting what to unset. Change their help text accordingly.

Good eyes. Perfectly makes sense. Will queue. Thanks.

Indeed, the patch looks obviously good to me. Thanks for the fixes!

Patrick