Skip to content

Commit 93ab00b

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 54e85e7 commit 93ab00b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/completion/git-completion.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,10 @@ _git_format_patch ()
17841784
" "" "${cur##--thread=}"
17851785
return
17861786
;;
1787+
--base=*|--interdiff=*|--range-diff=*)
1788+
__git_complete_refs --cur="${cur#--*=}"
1789+
return
1790+
;;
17871791
--*)
17881792
__gitcomp_builtin format-patch "$__git_format_patch_extra_options"
17891793
return

0 commit comments

Comments
 (0)