Re: [PATCH] send-email: recognize absolute path on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 15, 2014 at 12:42 PM, Erik Faye-Lund <kusmabite@xxxxxxxxx> wrote:
> On Tue, Apr 15, 2014 at 12:32 PM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
>> Am 4/15/2014 10:44, schrieb Erik Faye-Lund:
>>> From: Erik Faye-Lund <kusmabite@xxxxxxxxxxxxxx>
>>>
>>> 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@xxxxxxxxx>
>>> ---
>>>
>>> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]