Hi Tanga,
I applied v3 1/2 and 2/2 on top of master (ebdc087dc9) and built with
NO_RUST=1. t9300, t0012 and t9902 pass. On master,
"git --list-cmds=parseopt" lists none of diff-pairs, fast-import,
patch-id and var; with the series it lists all four, and the first
three print their options with --git-completion-helper.
On Fri, Oct 30, 2026 at 12:17 AM Tanga Joris [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+ } else if (!strcmp(av[1], "--git-completion-helper-all")) {
+ show_gitcomp(opts, 1);
+ exit(0);
Since this affects every caller of show_usage_with_options_if_asked(),
I ran "git <cmd> --git-completion-helper" and the "-all" form with
</dev/null for every builtin in an empty repository, with builds of
master and of the series, and compared stdout, stderr and the exit
status. They were identical.
The new t9300 test fails without the parse-options.c change, so it
guards the fix, but it only covers the plain form: with the "-all"
branch changed to show_gitcomp(opts, 0) it still passes. Could you
add a test for that branch? This one fails with that change and
passes without it:
test_expect_success 'R: --git-completion-helper-all does not read from stdin' '
echo garbage | git fast-import --git-completion-helper-all >all &&
test_grep -e "--allow-unsafe-features" all
'
Cynthia