nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch
Peter Simons e4fd05449e git: revert "2.16.2 -> 2.17.0"
This reverts commit 5d65b4ebeb6b2294654b3562fb15d7fa94751522, because it broke
git-add. See https://github.com/NixOS/nixpkgs/pull/38636#issuecomment-380182555
for details.
2018-04-11 09:51:06 +02:00

29 lines
1.2 KiB
Diff

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 8060ea35c..c81067a19 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -203,8 +203,7 @@ a password is obtained using 'git-credential'.
specify a full pathname of a sendmail-like program instead;
the program must support the `-i` option. Default value can
be specified by the `sendemail.smtpServer` configuration
- option; the built-in default is to search for `sendmail` in
- `/usr/sbin`, `/usr/lib` and $PATH if such program is
+ option; the built-in default is to search in $PATH if such program is
available, falling back to `localhost` otherwise.
--smtp-server-port=<port>::
diff --git a/git-send-email.perl b/git-send-email.perl
index edcc6d346..8e357aeab 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -885,8 +885,7 @@ if (defined $initial_reply_to) {
}
if (!defined $smtp_server) {
- my @sendmail_paths = qw( /usr/sbin/sendmail /usr/lib/sendmail );
- push @sendmail_paths, map {"$_/sendmail"} split /:/, $ENV{PATH};
+ my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH};
foreach (@sendmail_paths) {
if (-x $_) {
$smtp_server = $_;