builtins: send usage_with_options() help text to standard output
Using the show_usage_with_options_if_asked() helper we introduced earlier, fix callers of usage_with_options() that want to show the help text when explicitly asked by the end-user. The help text now goes to the standard output stream for them. The test in t7600 for "git merge -h" may want to be retired, as the same is covered by t0012 already, but it is specifically testing that the "-h" option gets a response even with a corrupt index file, so for now let's leave it there. Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -1598,8 +1598,8 @@ int cmd_fsmonitor__daemon(int argc, const char **argv, const char *prefix UNUSED
|
||||
OPT_END()
|
||||
};
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-h"))
|
||||
usage_with_options(builtin_fsmonitor__daemon_usage, options);
|
||||
show_usage_with_options_if_asked(argc, argv,
|
||||
builtin_fsmonitor__daemon_usage, options);
|
||||
|
||||
die(_("fsmonitor--daemon not supported on this platform"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user