]> git.99rst.org Git - git.git/commitdiff
notes, remote: show unknown subcommands between `'
authorSZEDER Gábor <redacted>
Mon, 5 Sep 2022 18:50:07 +0000 (20:50 +0200)
committerJunio C Hamano <redacted>
Wed, 7 Sep 2022 19:06:12 +0000 (12:06 -0700)
Update the "unknown subcommand" error message in 'git notes' and 'git
remote' to wrap the offending argument between `', to make it
consistent with the "unknown switch/option/subcommand" error messages
in parse-options.

Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/notes.c
builtin/remote.c

index 60410af572b3e0d61e47cf73bf654de250a77005..be51f692257f67e2765feb6ff63e8037f3a4f00d 100644 (file)
@@ -1017,7 +1017,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
                             PARSE_OPT_SUBCOMMAND_OPTIONAL);
        if (!fn) {
                if (argc) {
-                       error(_("unknown subcommand: %s"), argv[0]);
+                       error(_("unknown subcommand: `%s'"), argv[0]);
                        usage_with_options(git_notes_usage, options);
                }
                fn = list;
index 9aff864fd6f77de417912eb3a65923f8d7ed08b2..596a71af13a1dec79c5df1ee5d321d01153a11a1 100644 (file)
@@ -1769,7 +1769,7 @@ int cmd_remote(int argc, const char **argv, const char *prefix)
                return !!fn(argc, argv, prefix);
        } else {
                if (argc) {
-                       error(_("unknown subcommand: %s"), argv[0]);
+                       error(_("unknown subcommand: `%s'"), argv[0]);
                        usage_with_options(builtin_remote_usage, options);
                }
                return !!show_all();
git clone https://git.99rst.org/PROJECT