diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-13 16:37:28 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 16:37:28 +0300 |
commit | 95182c65d844e799e80a8f8997e357cdf8a3c7a6 (patch) | |
tree | 1049911c1f6bc8a8af9523b7745e3926d6ca1fa8 /git-send-email.perl | |
parent | 1e4a714e689e14726982941d8e61db06c6c7d58d (diff) | |
parent | 13374987dd889858758afef458bd8a8cbf15bb4d (diff) |
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
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 4b9d3ad1bd..8eb63b5a2f 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -122,6 +122,11 @@ EOT exit(1); } +sub completion_helper { + print Git::command('format-patch', '--git-completion-helper'); + exit(0); +} + # most mail servers generate the Date: header, but not all... sub format_2822_time { my ($time) = @_; @@ -314,6 +319,7 @@ $SIG{INT} = \&signal_handler; # needing, first, from the command line: my $help; +my $git_completion_helper; my $rc = GetOptions("h" => \$help, "dump-aliases" => \$dump_aliases); usage() unless $rc; @@ -377,9 +383,11 @@ $rc = GetOptions( "no-xmailer" => sub {$use_xmailer = 0}, "batch-size=i" => \$batch_size, "relogin-delay=i" => \$relogin_delay, + "git-completion-helper" => \$git_completion_helper, ); usage() if $help; +completion_helper() if $git_completion_helper; unless ($rc) { usage(); } |