Merge branch 'nd/complete-format-patch'

The support for format-patch (and send-email) by the command-line
completion script (in contrib/) has been simplified a bit.

* nd/complete-format-patch:
  completion: use __gitcomp_builtin for format-patch
This commit is contained in:
Junio C Hamano
2018-11-13 22:37:28 +09:00
2 changed files with 14 additions and 10 deletions

View File

@ -1521,13 +1521,9 @@ _git_fetch ()
__git_complete_remote_or_refspec
}
__git_format_patch_options="
--stdout --attach --no-attach --thread --thread= --no-thread
--numbered --start-number --numbered-files --keep-subject --signoff
--signature --no-signature --in-reply-to= --cc= --full-index --binary
--not --all --cover-letter --no-prefix --src-prefix= --dst-prefix=
--inline --suffix= --ignore-if-in-upstream --subject-prefix=
--output-directory --reroll-count --to= --quiet --notes
__git_format_patch_extra_options="
--full-index --not --all --no-prefix --src-prefix=
--dst-prefix= --notes
"
_git_format_patch ()
@ -1540,7 +1536,7 @@ _git_format_patch ()
return
;;
--*)
__gitcomp "$__git_format_patch_options"
__gitcomp_builtin format-patch "$__git_format_patch_extra_options"
return
;;
esac
@ -2070,7 +2066,7 @@ _git_send_email ()
return
;;
--*)
__gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to
__gitcomp_builtin send-email "--annotate --bcc --cc --cc-cmd --chain-reply-to
--compose --confirm= --dry-run --envelope-sender
--from --identity
--in-reply-to --no-chain-reply-to --no-signed-off-by-cc
@ -2079,7 +2075,7 @@ _git_send_email ()
--smtp-server-port --smtp-encryption= --smtp-user
--subject --suppress-cc= --suppress-from --thread --to
--validate --no-validate
$__git_format_patch_options"
$__git_format_patch_extra_options"
return
;;
esac