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

Re: [RFC/PATCH v2 1/1] cygwin: Add fast_lstat() and fast_fstat() functions

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2013, 17:43 UTC
Message-ID
<7v8v134vc6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<51E5D38E.6080202@gmail.com>
Mark Levedahl <mlevedahl@gmail.com> writes:
Show 20 quoted lines
> Cygwin 1.7 is very different than the earlier, no longer supported,
> and no longer available Cygwin variants in many ways, but stat is one
> of them. Cygwin 1.7 uses Windows ACLs to represent file permissions,
> and therefore gets the file permissions directly from the underlying
> OS calls. Earlier Cygwin versions (attempted to) overlay POSIX
> permissions on Windows systems using extended attributes and other
> means, and in many cases had to resort to opening the file and
> examining it to determine executability. This is not true in 1.7.
>
> Therefore, your later patch would be expected to have much less
> benefit for 1.7 than for 1.5 (I don't detect *any* benefit on 1.7 when
> I set core.filemode=false). There are many choices, three are:
>
> a) Remove the win32 stat funcs, eliminating all of the troublesome
> code paths and maintenance burden (your original patch).
> b) Add your latest patch, with attendant complexity and maintenance
> burden, to support a version of Cygwin that is no longer available and
> was last updated over four years ago.
> c) Like b, except make this triggered only by a "CYGWIN_15" macro,
> limiting this to use by the legacy cygwin platform.
Let's do (a) in a single patch, then.

People who do want to keep running older Cygwin installation they already have can revert the removal and rebuild Git, but the number of people who have to do so will become only smaller over time if older Cygwin versions are no longer available.

I presume that we _could_ add a CYGWIN_15 macro that conditionally keeps the win32 lstat implementation and get_st_mode_bits() part, and that might make it easier for folks with older Cygwin installations, but I am not sure if it is worth it.

Show 7 quoted lines
> I strongly vote for a, could support c, but fear b is just going to
> keep us chasing down bugs. Especially so when we consider that this
> patch can only speed things up when core.filemode=false, which mode:
> a) causes git to fail its test suite.
> b) breaks compatibility with Linux
> c) violates the primary goal of the Cygwin project, which is to
> provide a Linux environment on Windows.
Previous: Mark Levedahl
Message 16 of 16 in “cygwin: Add fast_lstat() and fast_fstat() functions”
  1. 1/1 cygwin: Add fast_lstat() and fast_fstat() functionsRamsay Jones, Jul 10, 2013
  2. Mark LevedahlJul 14, 2013
  3. Junio C HamanoJul 15, 2013
  4. Torsten BögershausenJul 16, 2013
  5. Mark LevedahlJul 16, 2013
  6. Dmitry PotapovJul 16, 2013
  7. Mark LevedahlJul 16, 2013
  8. Ramsay JonesJul 18, 2013
  9. Torsten BögershausenJul 18, 2013
  10. Mark LevedahlJul 18, 2013
  11. Junio C HamanoJul 18, 2013
  12. Mark LevedahlJul 19, 2013
  13. Mark LevedahlJul 16, 2013
  14. Ramsay JonesJul 16, 2013
  15. Mark LevedahlJul 16, 2013
  16. Junio C HamanoJul 18, 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.