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

Re: [PATCH] Cygwin has trustable filemode

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 22, 2013, 05:02 UTC
Message-ID
<7vli4zqjap.fsf@alter.siamese.dyndns.org>
In-Reply-To
<51ECA746.7040702@gmail.com>
Mark Levedahl <mlevedahl@gmail.com> writes:
Show 26 quoted lines
> On 07/21/2013 05:56 PM, Junio C Hamano wrote:
> ...
>> There are only three possible ways going forward, I think:
>>
>>   (A) Drop Mark's patch, and do nothing else, because breakages of
>>       other people's programs are not fixed by Cygwin 1.7's improved
>>       filesystem support, and users still use those mode breaking
>>       programs written by others;
>>
>>   (B) Drop Mark's patch, and revert c869753e, because it is not the
>>       business of our project to sweep breakages of other people's
>>       tools under the rug by crippling our software; or
>>
>>   (C) Drop NO_TRUSTABLE_FILEMODE for _all_ versions of Cygwin,
>>       declaring that the spirit of c869753e to work around bugs in
>>       other people's software by crippling Git is justified, but that
>>       it is no longer necessary on Cygwin because people do not use
>>       such misbehaving third-party tools anymore.
>>
>> These three each rely on its own precondition; I suspect it is
>> likely that (A)'s is the most accurate description of the real world.
>
> Perhaps the simplest approach is to just defer to the judgement of the
> Cygwin project maintainers here.
>
> a) The Cygwin project has its stated objective of being as matching Linux.

That does not say much. On Linux, third-party "native Windows applications" that necessitated c869753e (Force core.filemode to false on Cygwin., 2006-12-30) to help users is not an issue. On Cygwin, it still is.

> b) The Cygwin project has always shipped git binaries built without
> NO_TRUSTABLE_FILEMODE
That is a fair point.  So let's do this instead.
-- >8 --
From: Mark Levedahl <mlevedahl@gmail.com>
Subject: [PATCH] cygwin: stop forcing core.filemode=false

We force core.filemode=false since c869753e (Force core.filemode to false on Cygwin., 2006-12-30), even when the repository is on a filesystem on which Cygwin can give us trustable filemodes, because many native Windows applications the users use to edit files in the working tree tend to (re)create files with executable bit randomly set or reset. However, binary distribution of Git that is supplied by the downstream project to its users has been built without this consideration.

Drop NO_TRUSTABLE_FILEMODE from our default configuration so that hand-compiled Git out of box will match theirs.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 config.mak.uname | 1 -
 1 file changed, 1 deletion(-)
diff --git a/config.mak.uname b/config.mak.uname
index 7ac541e..779d06a 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -163,7 +163,6 @@ ifeq ($(uname_O),Cygwin)
 	NO_THREAD_SAFE_PREAD = YesPlease
 	NEEDS_LIBICONV = YesPlease
 	NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
-	NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
 	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
 	# There are conflicting reports about this.
 	# On some boxes NO_MMAP is needed, and not so elsewhere.
-- 
1.8.3.3-1030-g100bb15
Previous: Mark LevedahlNext: Mark Levedahl
Message 18 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.