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

Re: [PATCH] Cygwin has trustable filemode

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jul 16, 2013, 23:22 UTC
Message-ID
<51E5D59D.1010807@gmail.com>
In-Reply-To
<51E5B903.9050601@ramsay1.demon.co.uk>
On 07/16/2013 05:20 PM, Ramsay Jones wrote:
Show 13 quoted lines
> Mark Levedahl wrote:
>> The supported Cygwin distribution on supported Windows versions provides
>> complete support for POSIX filemodes, so enable this by default. git as
>> distributed by the Cygwin project is configured this way.
>>
>> This fixes one testsuite failure:
>> t3300 test 17 (diff-index -M -p with mode change quotes funny filename)
> Huh? How is it running that test? Does cygwin 1.7 somehow allow tabs in
> filenames? For me, on cygwin 1.5, that test reports:
>
>      $ ./t3300-funny-names.sh
>      1..0 # SKIP Your filesystem does not allow tabs in filenames
>      $

Cygwin 1.7 accesses the file system in a very different way than 1.5/earlier, so handles funny names with alacrity.

Show 6 quoted lines
>>   
> The motivation for the original patch had more to do with "windows people"
> using win32 text editors which set the executable bit inappropriately.
> (see commit c869753e).
>
> Since I use cygwin tools (vim), I don't have this problem. :-D

This is a perfect use for the pre-commit script. I've been doing this for years, changing line endings and executability based upon file type. This could no doubt also be handled by gitattributes now as well. (Almost) all windows editors are perfectly happy with \n line endings, and none I know of care about execute permissions. I strongly believe that making the file line ending mode and execute status conform to cross-platform standards is the "right" approach rather than ignoring these on Windows then making others on other platforms clean up the mess later.

Mark
Previous: Ramsay JonesNext: Mark Levedahl
Message 3 of 19 in “Cygwin has trustable filemode”
  1. Cygwin has trustable filemodeMark Levedahl, Jul 14, 2013
  2. Ramsay JonesJul 16, 2013
  3. Mark LevedahlJul 16, 2013
  4. Cygwin has trustable filemodeMark Levedahl, Jul 19, 2013
  5. Junio C HamanoJul 19, 2013
  6. Mark LevedahlJul 19, 2013
  7. Junio C HamanoJul 19, 2013
  8. Mark LevedahlJul 19, 2013
  9. 1/4 Cygwin 1.7 has trustable filemodeMark Levedahl, Jul 19, 2013
  10. 2/4 Cygwin 1.7 needs compat/regexMark Levedahl, Jul 19, 2013
  11. 3/4 Cygwin 1.7 has thread-safe preadMark Levedahl, Jul 19, 2013
  12. 4/4 Cygwin 1.7 supports mmapMark Levedahl, Jul 19, 2013
  13. Jonathan NiederJul 19, 2013
  14. Ramsay JonesJul 20, 2013
  15. Ramsay JonesJul 20, 2013
  16. Junio C HamanoJul 21, 2013
  17. Mark LevedahlJul 22, 2013
  18. Junio C HamanoJul 22, 2013
  19. Mark LevedahlJul 22, 2013

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.