All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] send-email: recognize absolute path on Windows
@ 2014-04-15  8:44 Erik Faye-Lund
  2014-04-15 10:32 ` Johannes Sixt
  0 siblings, 1 reply; 8+ messages in thread
From: Erik Faye-Lund @ 2014-04-15  8:44 UTC (permalink / raw)
  To: git; +Cc: msysgit, johannes.schindelin

From: Erik Faye-Lund <kusmabite@googlemail.com>

On Windows, absolute paths might start with a DOS drive prefix,
which this check fails to recognize.

Unfortunately, we cannot simply use the file_name_is_absolute
helper in File::Spec::Functions, because Git for Windows has an
MSYS-based Perl, where this helper doesn't grok DOS
drive-prefixes.

So let's manually check for these in that case, and fall back to
the File::Spec-helper on other platforms (e.g Win32 with native
Perl)

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---

Here's a patch that we've been running with a variation of in
Git for Windows for a while. That version wasn't quite palatable,
as it recognized DOS drive-prefixes on all platforms.

 git-send-email.perl | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index fdb0029..c4d85a7 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1113,6 +1113,18 @@ sub ssl_verify_params {
 	}
 }
 
+sub file_name_is_absolute {
+	my ($path) = @_;
+
+	# msys does not grok DOS drive-prefixes
+	if ($^O eq 'msys') {
+		return ($path =~ m#^/# || $path =~ m#[a-zA-Z]\:#)
+	}
+
+	require File::Spec::Functions;
+	return File::Spec::Functions::file_name_is_absolute($path);
+}
+
 # Returns 1 if the message was sent, and 0 otherwise.
 # In actuality, the whole program dies when there
 # is an error sending a message.
@@ -1197,7 +1209,7 @@ X-Mailer: git-send-email $gitversion
 
 	if ($dry_run) {
 		# We don't want to send the email.
-	} elsif ($smtp_server =~ m#^/#) {
+	} elsif (file_name_is_absolute($smtp_server)) {
 		my $pid = open my $sm, '|-';
 		defined $pid or die $!;
 		if (!$pid) {
-- 
1.9.0.msysgit.0

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] send-email: recognize absolute path on Windows
  2014-04-15  8:44 [PATCH] send-email: recognize absolute path on Windows Erik Faye-Lund
@ 2014-04-15 10:32 ` Johannes Sixt
  2014-04-15 10:42   ` Erik Faye-Lund
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Sixt @ 2014-04-15 10:32 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: git, msysgit, johannes.schindelin

Am 4/15/2014 10:44, schrieb Erik Faye-Lund:
> From: Erik Faye-Lund <kusmabite@googlemail.com>
> 
> On Windows, absolute paths might start with a DOS drive prefix,
> which this check fails to recognize.
> 
> Unfortunately, we cannot simply use the file_name_is_absolute
> helper in File::Spec::Functions, because Git for Windows has an
> MSYS-based Perl, where this helper doesn't grok DOS
> drive-prefixes.
> 
> So let's manually check for these in that case, and fall back to
> the File::Spec-helper on other platforms (e.g Win32 with native
> Perl)
> 
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
> 
> Here's a patch that we've been running with a variation of in
> Git for Windows for a while. That version wasn't quite palatable,
> as it recognized DOS drive-prefixes on all platforms.

Did you consider patching msysgit's lib/perl5/5.8.8/File/Spec.pm by
inserting a line "msys => 'Win32'," near the top of the file; it is the
hash table that decides which path "style" is selected depending on $^O.
Then File::Spec->file_name_is_absolute($path) could be used without a wrapper.

> 
>  git-send-email.perl | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index fdb0029..c4d85a7 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1113,6 +1113,18 @@ sub ssl_verify_params {
>  	}
>  }
>  
> +sub file_name_is_absolute {
> +	my ($path) = @_;
> +
> +	# msys does not grok DOS drive-prefixes
> +	if ($^O eq 'msys') {
> +		return ($path =~ m#^/# || $path =~ m#[a-zA-Z]\:#)
> +	}
> +
> +	require File::Spec::Functions;
> +	return File::Spec::Functions::file_name_is_absolute($path);
> +}
> +
>  # Returns 1 if the message was sent, and 0 otherwise.
>  # In actuality, the whole program dies when there
>  # is an error sending a message.
> @@ -1197,7 +1209,7 @@ X-Mailer: git-send-email $gitversion
>  
>  	if ($dry_run) {
>  		# We don't want to send the email.
> -	} elsif ($smtp_server =~ m#^/#) {
> +	} elsif (file_name_is_absolute($smtp_server)) {
>  		my $pid = open my $sm, '|-';
>  		defined $pid or die $!;
>  		if (!$pid) {
> 

There's another instance in the non-$quiet code path around line 1275 that
needs the same treatment.

-- Hannes

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] send-email: recognize absolute path on Windows
  2014-04-15 10:32 ` Johannes Sixt
@ 2014-04-15 10:42   ` Erik Faye-Lund
  2014-04-15 16:57     ` Re* " Junio C Hamano
  2014-04-15 20:28     ` Erik Faye-Lund
  0 siblings, 2 replies; 8+ messages in thread
From: Erik Faye-Lund @ 2014-04-15 10:42 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: GIT Mailing-list, msysGit, Johannes Schindelin

On Tue, Apr 15, 2014 at 12:32 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Am 4/15/2014 10:44, schrieb Erik Faye-Lund:
>> From: Erik Faye-Lund <kusmabite@googlemail.com>
>>
>> On Windows, absolute paths might start with a DOS drive prefix,
>> which this check fails to recognize.
>>
>> Unfortunately, we cannot simply use the file_name_is_absolute
>> helper in File::Spec::Functions, because Git for Windows has an
>> MSYS-based Perl, where this helper doesn't grok DOS
>> drive-prefixes.
>>
>> So let's manually check for these in that case, and fall back to
>> the File::Spec-helper on other platforms (e.g Win32 with native
>> Perl)
>>
>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>> ---
>>
>> Here's a patch that we've been running with a variation of in
>> Git for Windows for a while. That version wasn't quite palatable,
>> as it recognized DOS drive-prefixes on all platforms.
>
> Did you consider patching msysgit's lib/perl5/5.8.8/File/Spec.pm by
> inserting a line "msys => 'Win32'," near the top of the file; it is the
> hash table that decides which path "style" is selected depending on $^O.
> Then File::Spec->file_name_is_absolute($path) could be used without a wrapper.

I did not, but that works, and is IMO much nicer. Thanks for the idea!

>>
>>  git-send-email.perl | 14 +++++++++++++-
>>  1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/git-send-email.perl b/git-send-email.perl
>> index fdb0029..c4d85a7 100755
>> --- a/git-send-email.perl
>> +++ b/git-send-email.perl
>> @@ -1113,6 +1113,18 @@ sub ssl_verify_params {
>>       }
>>  }
>>
>> +sub file_name_is_absolute {
>> +     my ($path) = @_;
>> +
>> +     # msys does not grok DOS drive-prefixes
>> +     if ($^O eq 'msys') {
>> +             return ($path =~ m#^/# || $path =~ m#[a-zA-Z]\:#)
>> +     }
>> +
>> +     require File::Spec::Functions;
>> +     return File::Spec::Functions::file_name_is_absolute($path);
>> +}
>> +
>>  # Returns 1 if the message was sent, and 0 otherwise.
>>  # In actuality, the whole program dies when there
>>  # is an error sending a message.
>> @@ -1197,7 +1209,7 @@ X-Mailer: git-send-email $gitversion
>>
>>       if ($dry_run) {
>>               # We don't want to send the email.
>> -     } elsif ($smtp_server =~ m#^/#) {
>> +     } elsif (file_name_is_absolute($smtp_server)) {
>>               my $pid = open my $sm, '|-';
>>               defined $pid or die $!;
>>               if (!$pid) {
>>
>
> There's another instance in the non-$quiet code path around line 1275 that
> needs the same treatment.

Good catch, thanks!

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re* [PATCH] send-email: recognize absolute path on Windows
  2014-04-15 10:42   ` Erik Faye-Lund
@ 2014-04-15 16:57     ` Junio C Hamano
  2014-04-15 20:37       ` Junio C Hamano
  2014-04-15 20:28     ` Erik Faye-Lund
  1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2014-04-15 16:57 UTC (permalink / raw)
  To: kusmabite; +Cc: Johannes Sixt, GIT Mailing-list, msysGit, Johannes Schindelin

Erik Faye-Lund <kusmabite@gmail.com> writes:

>>> Here's a patch that we've been running with a variation of in
>>> Git for Windows for a while. That version wasn't quite palatable,
>>> as it recognized DOS drive-prefixes on all platforms.
>>
>> Did you consider patching msysgit's lib/perl5/5.8.8/File/Spec.pm by
>> inserting a line "msys => 'Win32'," near the top of the file; it is the
>> hash table that decides which path "style" is selected depending on $^O.
>> Then File::Spec->file_name_is_absolute($path) could be used without a wrapper.
>
> I did not, but that works, and is IMO much nicer. Thanks for the idea!
> ...
>> There's another instance in the non-$quiet code path around line 1275 that
>> needs the same treatment.
>
> Good catch, thanks!

Thanks, both.  I'd expect another round then?

-- >8 --
From: Erik Faye-Lund <kusmabite@googlemail.com>

On Windows, absolute paths might start with a DOS drive prefix,
which these checks fail to recognize.

Use file_name_is_absolute from File::Spec::Functions for
portability.  The Perl module msysgit has been shipping needs to be
updated for this patch to work, though.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Helepd-by: Johannes Sixt <j6t@kdbg.org>
---

 git-send-email.perl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index fdb0029..eda3917 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -25,7 +25,7 @@
 use Data::Dumper;
 use Term::ANSIColor;
 use File::Temp qw/ tempdir tempfile /;
-use File::Spec::Functions qw(catfile);
+use File::Spec::Functions qw(catfile file_name_is_absolute);
 use Error qw(:try);
 use Git;
 
@@ -1197,7 +1197,7 @@ sub send_message {
 
 	if ($dry_run) {
 		# We don't want to send the email.
-	} elsif ($smtp_server =~ m#^/#) {
+	} elsif (file_name_is_absolute($smtp_server)) {
 		my $pid = open my $sm, '|-';
 		defined $pid or die $!;
 		if (!$pid) {
@@ -1271,7 +1271,7 @@ sub send_message {
 		printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject);
 	} else {
 		print (($dry_run ? "Dry-" : "")."OK. Log says:\n");
-		if ($smtp_server !~ m#^/#) {
+		if (file_name_is_absolute($smtp_server)) {
 			print "Server: $smtp_server\n";
 			print "MAIL FROM:<$raw_from>\n";
 			foreach my $entry (@recipients) {

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] send-email: recognize absolute path on Windows
  2014-04-15 10:42   ` Erik Faye-Lund
  2014-04-15 16:57     ` Re* " Junio C Hamano
@ 2014-04-15 20:28     ` Erik Faye-Lund
  1 sibling, 0 replies; 8+ messages in thread
From: Erik Faye-Lund @ 2014-04-15 20:28 UTC (permalink / raw)
  To: Johannes Sixt; +Cc: GIT Mailing-list, msysGit, Johannes Schindelin

On Tue, Apr 15, 2014 at 12:42 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
> On Tue, Apr 15, 2014 at 12:32 PM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>> Am 4/15/2014 10:44, schrieb Erik Faye-Lund:
>>> From: Erik Faye-Lund <kusmabite@googlemail.com>
>>>
>>> On Windows, absolute paths might start with a DOS drive prefix,
>>> which this check fails to recognize.
>>>
>>> Unfortunately, we cannot simply use the file_name_is_absolute
>>> helper in File::Spec::Functions, because Git for Windows has an
>>> MSYS-based Perl, where this helper doesn't grok DOS
>>> drive-prefixes.
>>>
>>> So let's manually check for these in that case, and fall back to
>>> the File::Spec-helper on other platforms (e.g Win32 with native
>>> Perl)
>>>
>>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>>> ---
>>>
>>> Here's a patch that we've been running with a variation of in
>>> Git for Windows for a while. That version wasn't quite palatable,
>>> as it recognized DOS drive-prefixes on all platforms.
>>
>> Did you consider patching msysgit's lib/perl5/5.8.8/File/Spec.pm by
>> inserting a line "msys => 'Win32'," near the top of the file; it is the
>> hash table that decides which path "style" is selected depending on $^O.
>> Then File::Spec->file_name_is_absolute($path) could be used without a wrapper.
>
> I did not, but that works, and is IMO much nicer. Thanks for the idea!

Actually, after having tried that, other stuff starts to break... So
back to the drawing-board.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re* [PATCH] send-email: recognize absolute path on Windows
  2014-04-15 16:57     ` Re* " Junio C Hamano
@ 2014-04-15 20:37       ` Junio C Hamano
  2014-04-15 20:49         ` Erik Faye-Lund
  0 siblings, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2014-04-15 20:37 UTC (permalink / raw)
  To: kusmabite; +Cc: Johannes Sixt, GIT Mailing-list, msysGit, Johannes Schindelin

Junio C Hamano <gitster@pobox.com> writes:

> Thanks, both.  I'd expect another round then?
>
> -- >8 --
> From: Erik Faye-Lund <kusmabite@googlemail.com>
>
> On Windows, absolute paths might start with a DOS drive prefix,
> which these checks fail to recognize.
>
> Use file_name_is_absolute from File::Spec::Functions for
> portability.  The Perl module msysgit has been shipping needs to be
> updated for this patch to work, though.
>
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> Helepd-by: Johannes Sixt <j6t@kdbg.org>
> ---
>
>  git-send-email.perl | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index fdb0029..eda3917 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -25,7 +25,7 @@
>  use Data::Dumper;
>  use Term::ANSIColor;
>  use File::Temp qw/ tempdir tempfile /;
> -use File::Spec::Functions qw(catfile);
> +use File::Spec::Functions qw(catfile file_name_is_absolute);
>  use Error qw(:try);
>  use Git;
>  
> @@ -1197,7 +1197,7 @@ sub send_message {
>  
>  	if ($dry_run) {
>  		# We don't want to send the email.
> -	} elsif ($smtp_server =~ m#^/#) {
> +	} elsif (file_name_is_absolute($smtp_server)) {
>  		my $pid = open my $sm, '|-';
>  		defined $pid or die $!;
>  		if (!$pid) {
> @@ -1271,7 +1271,7 @@ sub send_message {
>  		printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject);
>  	} else {
>  		print (($dry_run ? "Dry-" : "")."OK. Log says:\n");
> -		if ($smtp_server !~ m#^/#) {
> +		if (file_name_is_absolute($smtp_server)) {

Obviously this has to be "!file_name_is_absolute($smtp_server)" ;-)

>  			print "Server: $smtp_server\n";
>  			print "MAIL FROM:<$raw_from>\n";
>  			foreach my $entry (@recipients) {
>
> -- 

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re* [PATCH] send-email: recognize absolute path on Windows
  2014-04-15 20:37       ` Junio C Hamano
@ 2014-04-15 20:49         ` Erik Faye-Lund
  2014-04-15 21:06           ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Erik Faye-Lund @ 2014-04-15 20:49 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Johannes Sixt, GIT Mailing-list, msysGit, Johannes Schindelin

On Tue, Apr 15, 2014 at 10:37 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Thanks, both.  I'd expect another round then?
>>
>> -- >8 --
>> From: Erik Faye-Lund <kusmabite@googlemail.com>
>>
>> On Windows, absolute paths might start with a DOS drive prefix,
>> which these checks fail to recognize.
>>
>> Use file_name_is_absolute from File::Spec::Functions for
>> portability.  The Perl module msysgit has been shipping needs to be
>> updated for this patch to work, though.
>>
>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>> Helepd-by: Johannes Sixt <j6t@kdbg.org>
>> ---
>>
>>  git-send-email.perl | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/git-send-email.perl b/git-send-email.perl
>> index fdb0029..eda3917 100755
>> --- a/git-send-email.perl
>> +++ b/git-send-email.perl
>> @@ -25,7 +25,7 @@
>>  use Data::Dumper;
>>  use Term::ANSIColor;
>>  use File::Temp qw/ tempdir tempfile /;
>> -use File::Spec::Functions qw(catfile);
>> +use File::Spec::Functions qw(catfile file_name_is_absolute);
>>  use Error qw(:try);
>>  use Git;
>>
>> @@ -1197,7 +1197,7 @@ sub send_message {
>>
>>       if ($dry_run) {
>>               # We don't want to send the email.
>> -     } elsif ($smtp_server =~ m#^/#) {
>> +     } elsif (file_name_is_absolute($smtp_server)) {
>>               my $pid = open my $sm, '|-';
>>               defined $pid or die $!;
>>               if (!$pid) {
>> @@ -1271,7 +1271,7 @@ sub send_message {
>>               printf (($dry_run ? "Dry-" : "")."Sent %s\n", $subject);
>>       } else {
>>               print (($dry_run ? "Dry-" : "")."OK. Log says:\n");
>> -             if ($smtp_server !~ m#^/#) {
>> +             if (file_name_is_absolute($smtp_server)) {
>
> Obviously this has to be "!file_name_is_absolute($smtp_server)" ;-)
>

Heh, yeah. Apart from that, your patch is identical to mine. But, ugh.
Modifying File::Spec into thinking msys is Win32 doesn't seems to
work, as I get other random path-errors in that case:

"Error in tempdir() using \tmp\XXXXXXXXXX: Parent directory (\tmp) is
not a directory at /libexec/git-core/git-send-email line 554"

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re* [PATCH] send-email: recognize absolute path on Windows
  2014-04-15 20:49         ` Erik Faye-Lund
@ 2014-04-15 21:06           ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2014-04-15 21:06 UTC (permalink / raw)
  To: kusmabite; +Cc: Johannes Sixt, GIT Mailing-list, msysGit, Johannes Schindelin

Erik Faye-Lund <kusmabite@gmail.com> writes:

> ... But, ugh.
> Modifying File::Spec into thinking msys is Win32 doesn't seems to
> work,

OK, I'll drop the tentative version and wait for a proper reroll.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-15 21:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15  8:44 [PATCH] send-email: recognize absolute path on Windows Erik Faye-Lund
2014-04-15 10:32 ` Johannes Sixt
2014-04-15 10:42   ` Erik Faye-Lund
2014-04-15 16:57     ` Re* " Junio C Hamano
2014-04-15 20:37       ` Junio C Hamano
2014-04-15 20:49         ` Erik Faye-Lund
2014-04-15 21:06           ` Junio C Hamano
2014-04-15 20:28     ` Erik Faye-Lund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.