Browse Source

notes, remote: show unknown subcommands between `'

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 <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
SZEDER Gábor 2 years ago committed by Junio C Hamano
parent
commit
dd834d75ca
  1. 2
      builtin/notes.c
  2. 2
      builtin/remote.c

2
builtin/notes.c

@ -1017,7 +1017,7 @@ int cmd_notes(int argc, const char **argv, const char *prefix) @@ -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;

2
builtin/remote.c

@ -1769,7 +1769,7 @@ int cmd_remote(int argc, const char **argv, const char *prefix) @@ -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();

Loading…
Cancel
Save