Re: [PATCH 2/2] On Cygwin support both UNIX and DOS style path-names

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

 



Am 05.08.2011 18:10, schrieb Pascal Obry:
> In fact Cygwin supports both, so make Git agree with this.
> The failing case is when a file is committed in a sub-dir of the
> repository using a log message from a file specified with a DOS
> style path-name. To reproduce:
> 
>    $ cd src
>    $ git commit -F c:\tmp\log.txt file.c
>    fatal: could not read log file 'src/c:\tmp\log.txt': No such file \
>    or directory.

Do you also want to support this:

     $ git add src\file.c

i.e., backslash in pathspec? Then you need more than this:

> +#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
> +#define is_dir_sep(c) ((c) == '/' || (c) == '\\')

In particular, you have to enable backslash processing in
setup.c:prefix_filename(), but then you lose the ability to escape
special characters with the backslash.

-- Hannes
--
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]