]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-send-email.perl
Merge branch 'lj/mingw-pthread-cond'
[thirdparty/git.git] / git-send-email.perl
index 4b9d3ad1bdc56881add391def6ed52645ddb89a7..8eb63b5a2f8d07038f6c8ef645a483cd77ffd99f 100755 (executable)
@@ -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();
 }