]> git.feebdaed.xyz Git - 0xmirror/git.git/commitdiff
config: fix suggestion for failed set of multi-valued option
authorRené Scharfe <l.s.r@web.de>
Mon, 24 Nov 2025 20:33:24 +0000 (21:33 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Nov 2025 22:59:02 +0000 (14:59 -0800)
The command "git config set <name> <value>" fails for an option that has
multiple values.  List the "git config set" flags that can be used,
instead of old-style "git config" actions.

Reported-by: Paul Wintz <pwintz@ucsc.edu>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/config.c

index 59fb113b0739268e0602a76db66c63049ab88960..ef1c1a9cf2c0c855fa80cc35b92ef91a34c8c447 100644 (file)
@@ -974,7 +974,7 @@ static int cmd_config_set(int argc, const char **argv, const char *prefix,
                                                     argv[0], comment, value);
                if (ret == CONFIG_NOTHING_SET)
                        error(_("cannot overwrite multiple values with a single value\n"
-                       "       Use a regexp, --add or --replace-all to change %s."), argv[0]);
+                       "       Use --value=<pattern>, --append or --all to change %s."), argv[0]);
        }
 
        location_options_release(&location_opts);