contrib/completion: complete options that take refs for format-patch
The completion for format-patch currently suggests --base=, --interdiff= and --range-diff= as options. However, with these `=` forms of the options, there is no space and we'd enter the `--*` case which means we don't call the __git_complete_revlist() at the end. Teach _git_format_patch() to complete refs in the case of --base=, --interdiff= and --range-diff=. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Sep 17, 2020 at 01:04 UTC
93ab00bd857c31a3aa5318120d162825303048c7
1 file changed
+4
contrib/completion/git-completion.bash
+4
@@ -1784,6 +1784,10 @@ _git_format_patch ()
1784
" "" "${cur##--thread=}"
1785
return
1786
;;
1787
+ --base=*|--interdiff=*|--range-diff=*)
1788
+ __git_complete_refs --cur="${cur#--*=}"
1789
+ return
1790
+ ;;
1791
--*)
1792
__gitcomp_builtin format-patch "$__git_format_patch_extra_options"
1793
return