summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-01-16 13:35:48 -0800
committerJunio C Hamano <gitster@pobox.com>2025-01-17 13:30:02 -0800
commite4c0a1499cace0c375b90d2d2d7b9baf1af12b76 (patch)
treeb279fb234f77bcda93d11732e9481d7bd3c6ee5b /builtin/commit.c
parentfbe8d3079d4a96aeb4e4529cc93cc0043b759a05 (diff)
t0012: optionally check that "-h" output goes to stdout
For most commands, "git foo -h" will send the help output to stdout, as this is what parse-options.c does. But some commands send it to stderr instead. This is usually because they call usage_with_options(), and should be switched to show_usage_help_and_exit_if_asked(). Currently t0012 is permissive and allows either behavior. We'd like it to eventually enforce that help goes to stdout, and teaching it to do so identifies the commands that need to be changed. But during the transition period, we don't want to enforce that for most test runs. So let's introduce a flag that will let most test runs use the permissive behavior, and people interested in converting commands can run: GIT_TEST_HELP_MUST_BE_STDOUT=1 ./t0012-help.sh to see the failures. Eventually (when all builtins have been converted) we'll remove this flag entirely and always check the strict behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions