mirror of
https://github.com/git/git.git
synced 2024-05-09 17:16:34 +02:00
Merge branch 'bk/complete-send-email' into seen
Command line completion support (in contrib/) has been taught to avoid offering revision names as candidates to "git send-email" when the command is used to send pre-generated files. * bk/complete-send-email: completion: don't complete revs when --no-format-patch
This commit is contained in:
commit
0d84efb4d2
|
@ -1315,10 +1315,12 @@ __git_find_last_on_cmdline ()
|
|||
while test $# -gt 1; do
|
||||
case "$1" in
|
||||
--show-idx) show_idx=y ;;
|
||||
--) shift && break ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
[ $# -eq 1 ] || return 1 # return 1 if we got wrong # of non-opts
|
||||
local wordlist="$1"
|
||||
|
||||
while [ $c -gt "$__git_cmd_idx" ]; do
|
||||
|
@ -2582,7 +2584,9 @@ _git_send_email ()
|
|||
return
|
||||
;;
|
||||
esac
|
||||
__git_complete_revlist
|
||||
if [ "$(__git_find_last_on_cmdline -- "--format-patch --no-format-patch")" != "--no-format-patch" ]; then
|
||||
__git_complete_revlist
|
||||
fi
|
||||
}
|
||||
|
||||
_git_stage ()
|
||||
|
|
Loading…
Reference in New Issue