]> git.ipfire.org Git - thirdparty/git.git/commit - git-send-email.perl
completion: use __gitcomp_builtin for format-patch
authorDuy Nguyen <pclouds@gmail.com>
Sat, 3 Nov 2018 06:03:18 +0000 (07:03 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 04:22:30 +0000 (13:22 +0900)
commit13374987dd889858758afef458bd8a8cbf15bb4d
treeb3f47bff1bc37a7230d158b2c8d436fc068f19b9
parentc4df23f7927d8d00e666a3c8d1b3375f1dc8a3c1
completion: use __gitcomp_builtin for format-patch

This helps format-patch gain completion for a couple new options,
notably --range-diff.

Since send-email completion relies on $__git_format_patch_options
which is now reduced, we need to do something not to regress
send-email completion.

The workaround here is implement --git-completion-helper in
send-email.perl just as a bridge to "format-patch --git-completion-helper".
This is enough to use __gitcomp_builtin on send-email (to take
advantage of caching).

In the end, send-email.perl can probably reuse the same info it passes
to GetOptions() to generate full --git-completion-helper output so
that we don't need to keep track of its options in git-completion.bash
anymore. But that's something for another boring day.

Helped-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
git-send-email.perl