git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Pascal Obry <pascal@obry.net>
Date
Aug 9, 2011, 20:38 UTC
Message-ID
<4E419AB3.7090405@obry.net>
In-Reply-To
<4E416D4A.40602@ramsay1.demon.co.uk>
Le 09/08/2011 19:24, Ramsay Jones a écrit :
Show 12 quoted lines
> Pascal Obry wrote:
>> 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.
>
> Hmm, are you using bash or cmd.exe? Using bash I get the following:
bash.
Show 19 quoted lines
>
>      $ cd src
>      $ git commut -F c:\tmp\log.txt file.c
>      fatal: could not read file 'src/c:tmplog.txt': No such file or directory
>      $
>
> Which is what I would expect of (any) posix shell, viz:
>
>      $ ls c:\
>      >  ^C
>      $ ls c:\\
>      AUTOEXEC.BAT*            NTDETECT.COM*               WATCOM/       msysgit/
>      CMPNENTS/                Program Files/              WINDOWS/      msysgit-old/
>      CONFIG.SYS*              RECYCLER/                   boot.ini*     ntldr*
>      Documents and Settings/  SUPPORT/                    cygwin/       pagefile.sys
>      I386/                    SWSTAMP.TXT*                cygwintemp/   ssl/
>      IO.SYS*                  System Volume Information/  dm/           uname/
>      MSDOS.SYS*               TOOLSCD/                    dm840/        zlib/
>      MSOCache/                VALUEADD/                   hiberfil.sys

Exactly, \\ this is what I have used and this is the bug. Cygwin supports ls c:\\ so should Cygwin/Git. My quoted example was missing the escape \.

-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
Previous: Ramsay JonesNext: Ramsay Jones
Message 15 of 19 in “[PATH 0/2] On Cygwin support both UNIX and DOS style path-names”
  1. Pascal ObryAug 5, 2011
  2. 1/2 git-compat-util: add generic find_last_dir_sep that respects is_dir_sepPascal Obry, Aug 5, 2011
  3. 2/2 On Cygwin support both UNIX and DOS style path-namesPascal Obry, Aug 5, 2011
  4. Erik Faye-LundAug 5, 2011
  5. Pascal ObryAug 5, 2011
  6. Erik Faye-LundAug 5, 2011
  7. Erik Faye-LundAug 5, 2011
  8. Pascal ObryAug 5, 2011
  9. Ramsay JonesAug 9, 2011
  10. Ramsay JonesAug 9, 2011
  11. Junio C HamanoAug 5, 2011
  12. Erik Faye-LundAug 5, 2011
  13. Pascal ObryAug 6, 2011
  14. Ramsay JonesAug 9, 2011
  15. Pascal ObryAug 9, 2011
  16. Ramsay JonesAug 11, 2011
  17. Pascal ObryAug 13, 2011
  18. Vijay LakshminarayananAug 10, 2011
  19. Johannes SixtAug 9, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.