diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-08-17 17:02:41 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-08-17 17:02:41 -0700 |
| commit | a00bda2b2fa5e6a8b224734cf72bb0601cd65b8a (patch) | |
| tree | 07f392959e2fe6511f298998671facbd0d8be73c /git-send-email.perl | |
| parent | 5676db26129bf18e77bb821d832b44c022dc9f47 (diff) | |
| parent | dd84e528a34c3822e7ab0473a95e411665b37681 (diff) | |
| download | git-a00bda2b2fa5e6a8b224734cf72bb0601cd65b8a.tar.xz | |
Merge branch 'dd/send-email-config'
Stop when "sendmail.*" configuration variables are defined, which
could be a mistaken attempt to define "sendemail.*" variables.
* dd/send-email-config:
git-send-email: die if sendmail.* config is set
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 36c47bae1d..1f425c0809 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -250,6 +250,7 @@ my $chain_reply_to = 0; my $use_xmailer = 1; my $validate = 1; my $target_xfer_encoding = 'auto'; +my $forbid_sendmail_variables = 1; my %config_bool_settings = ( "thread" => \$thread, @@ -263,6 +264,7 @@ my %config_bool_settings = ( "multiedit" => \$multiedit, "annotate" => \$annotate, "xmailer" => \$use_xmailer, + "forbidsendmailvariables" => \$forbid_sendmail_variables, ); my %config_settings = ( @@ -478,6 +480,12 @@ unless ($rc) { usage(); } +if ($forbid_sendmail_variables && (scalar Git::config_regexp("^sendmail[.]")) != 0) { + die __("fatal: found configuration options for 'sendmail'\n" . + "git-send-email is configured with the sendemail.* options - note the 'e'.\n" . + "Set sendemail.forbidSendmailVariables to false to disable this check.\n"); +} + die __("Cannot run git format-patch from outside a repository\n") if $format_patch and not $repo; |
