]> git.ipfire.org Git - thirdparty/git.git/commit
builtins: send usage_with_options() help text to standard output
authorJunio C Hamano <gitster@pobox.com>
Thu, 16 Jan 2025 21:35:51 +0000 (13:35 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jan 2025 21:30:03 +0000 (13:30 -0800)
commitb821c999ca5cb472160a2ebb33aeeac5efc2fddc
tree955f0eb05d2c883356831122bd8667b4f7d05c78
parent0148fd836a9b1954833471f61b4d2e058797af55
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>
14 files changed:
builtin/am.c
builtin/branch.c
builtin/checkout--worker.c
builtin/checkout-index.c
builtin/commit-tree.c
builtin/commit.c
builtin/fsmonitor--daemon.c
builtin/gc.c
builtin/ls-files.c
builtin/merge.c
builtin/rebase.c
builtin/update-index.c
t/helper/test-simple-ipc.c
t/t7600-merge.sh