diff options
author | René Scharfe <l.s.r@web.de> | 2023-08-26 10:06:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-08-28 08:20:20 -0700 |
commit | cd52d9e90f63a1a08023980d27f3004174d23655 (patch) | |
tree | 4ba145080817f3af3657bd893833d7ec12d79f68 /builtin/commit-graph.c | |
parent | 6807fcfedab84bc8cd0fbf721bc13c4e68cda9ae (diff) |
parse-options: allow omitting option help text
1b68387e02 (builtin/receive-pack.c: use parse_options API, 2016-03-02)
added the options --stateless-rpc, --advertise-refs and
--reject-thin-pack-for-testing with a NULL `help` string; 03831ef7b5
(difftool: implement the functionality in the builtin, 2017-01-19)
similarly added the "helpless" option --prompt. Presumably this was
done because all four options are hidden and self-explanatory.
They cause a NULL pointer dereference when using the option --help-all
with their respective tool, though. Handle such options gracefully
instead by turning the NULL pointer into an empty string at the top of
the loop, always printing a newline at the end and passing through the
separating newlines from the help text.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions