From 22d3fab8d43bd40adbe0582349b1ac8db29ba330 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 27 Jul 2009 21:05:40 +0200 Subject: [PATCH 1/2] send-email: accept absolute path even on Windows Signed-off-by: Johannes Schindelin --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index fdb0029b59..2bc9da362a 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1197,7 +1197,7 @@ X-Mailer: git-send-email $gitversion if ($dry_run) { # We don't want to send the email. - } elsif ($smtp_server =~ m#^/#) { + } elsif ($smtp_server =~ m#^/# || $smtp_server =~ m#[a-zA-Z]\:#) { my $pid = open my $sm, '|-'; defined $pid or die $!; if (!$pid) { From 31180f85455be02394a9662278b9850da8da9a73 Mon Sep 17 00:00:00 2001 From: bert Dvornik Date: Sun, 23 May 2010 03:00:47 -0400 Subject: [PATCH 2/2] send-email: handle Windows paths for display just like we do for processing In git-send-email.perl, here are two checks to determine if $smtp_server is an absolute path (so it'll be treated as a mailer) or not (so it'll be treated as a hostname). The one that handles actual mail processing has been taught to recognize Windows pathnames by commit 33b2e81f. The other check is just to tell the user what happened, so it's far less important, but the current state is that we will still claim to the user that c:/foo/bar is a server. =) This makes the second check consistent with the first. Signed-off-by: bert Dvornik --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index 2bc9da362a..f7a31e874e 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1271,7 +1271,7 @@ X-Mailer: git-send-email $gitversion printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject); } else { print (($dry_run ? "Dry-" : "")."OK. Log says:\n"); - if ($smtp_server !~ m#^/#) { + if ($smtp_server !~ m#^/# && $smtp_server !~ m#[a-zA-Z]:#) { print "Server: $smtp_server\n"; print "MAIL FROM:<$raw_from>\n"; foreach my $entry (@recipients) {