{"thread":{"id":"34435","subject":"[PATCH] Cygwin has trustable filemode","startedAt":"2013-07-14T16:13:10Z","lastAt":"2013-07-22T22:22:51Z","messageCount":19,"participants":["Mark Levedahl","Ramsay Jones","Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"223328","messageId":"1373818390-14451-1-git-send-email-mlevedahl@gmail.com","threadId":"34435","inReplyTo":null,"subject":"[PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-14T16:13:10Z","receivedAt":"2013-07-14T16:13:10Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"The supported Cygwin distribution on supported Windows versions provides\ncomplete support for POSIX filemodes, so enable this by default. git as\ndistributed by the Cygwin project is configured this way.\n\nThis fixes one testsuite failure:\nt3300 test 17 (diff-index -M -p with mode change quotes funny filename)\n\nHistorical notes: Earlier versions of Cygwin (version 1.5 and prior) had \nvarious methods for supporting posix file modes on different file systems, \noften using extended attributes, and this support was optional.  Such \nversions of Cygwin are not available on any public mirror and are not \nsupported by the Cygwin project. The currently available Cygwin supports \nPOSIX file modes without exception - this is not an optional \nconfiguration. The support does depend upon the underlying file system \n(neither Linux nor Cygwin can set an execute bit on a FAT file system as \nFAT has no such support), but as this is no different than Linux, the\ndefault should not treat Cygwin differently than Linux.  \n\nUsers who desire the non-POSIX mode of operation must explicitly set \ncore.filemode=False, accepting non-interoperability with Linux.  \n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\n config.mak.uname | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 7ac541e..779d06a 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -163,7 +163,6 @@ ifeq ($(uname_O),Cygwin)\n \tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n-\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n \t# There are conflicting reports about this.\n \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n-- \n1.8.3.2.0.13\n"},{"id":"223546","messageId":"51E5B903.9050601@ramsay1.demon.co.uk","threadId":"34435","inReplyTo":"1373818390-14451-1-git-send-email-mlevedahl@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-07-16T21:20:03Z","receivedAt":"2013-07-16T21:20:03Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Mark Levedahl wrote:\n> The supported Cygwin distribution on supported Windows versions provides\n> complete support for POSIX filemodes, so enable this by default. git as\n> distributed by the Cygwin project is configured this way.\n> \n> This fixes one testsuite failure:\n> t3300 test 17 (diff-index -M -p with mode change quotes funny filename)\n\nHuh? How is it running that test? Does cygwin 1.7 somehow allow tabs in\nfilenames? For me, on cygwin 1.5, that test reports:\n\n    $ ./t3300-funny-names.sh\n    1..0 # SKIP Your filesystem does not allow tabs in filenames\n    $\n\n> Historical notes: Earlier versions of Cygwin (version 1.5 and prior) had \n> various methods for supporting posix file modes on different file systems, \n> often using extended attributes, and this support was optional.  Such \n> versions of Cygwin are not available on any public mirror and are not \n> supported by the Cygwin project. The currently available Cygwin supports \n> POSIX file modes without exception - this is not an optional \n> configuration. The support does depend upon the underlying file system \n> (neither Linux nor Cygwin can set an execute bit on a FAT file system as \n> FAT has no such support), but as this is no different than Linux, the\n> default should not treat Cygwin differently than Linux.  \n\nThe motivation for the original patch had more to do with \"windows people\"\nusing win32 text editors which set the executable bit inappropriately.\n(see commit c869753e).\n\nSince I use cygwin tools (vim), I don't have this problem. :-D\n\n> Users who desire the non-POSIX mode of operation must explicitly set \n> core.filemode=False, accepting non-interoperability with Linux.  \n> \n> Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>\n> ---\n>  config.mak.uname | 1 -\n>  1 file changed, 1 deletion(-)\n> \n> diff --git a/config.mak.uname b/config.mak.uname\n> index 7ac541e..779d06a 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -163,7 +163,6 @@ ifeq ($(uname_O),Cygwin)\n>  \tNO_THREAD_SAFE_PREAD = YesPlease\n>  \tNEEDS_LIBICONV = YesPlease\n>  \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n> -\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n>  \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n>  \t# There are conflicting reports about this.\n>  \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n> \n\nShould you revert commit c869753e (\"Force core.filemode to false\non Cygwin.\", 30-12-2006) instead?\n\nATB,\nRamsay Jones\n"},{"id":"223555","messageId":"51E5D59D.1010807@gmail.com","threadId":"34435","inReplyTo":"51E5B903.9050601@ramsay1.demon.co.uk","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-16T23:22:05Z","receivedAt":"2013-07-16T23:22:05Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/16/2013 05:20 PM, Ramsay Jones wrote:\n> Mark Levedahl wrote:\n>> The supported Cygwin distribution on supported Windows versions provides\n>> complete support for POSIX filemodes, so enable this by default. git as\n>> distributed by the Cygwin project is configured this way.\n>>\n>> This fixes one testsuite failure:\n>> t3300 test 17 (diff-index -M -p with mode change quotes funny filename)\n> Huh? How is it running that test? Does cygwin 1.7 somehow allow tabs in\n> filenames? For me, on cygwin 1.5, that test reports:\n>\n>      $ ./t3300-funny-names.sh\n>      1..0 # SKIP Your filesystem does not allow tabs in filenames\n>      $\nCygwin 1.7 accesses the file system in a very different way than \n1.5/earlier, so handles funny names with alacrity.\n>>   \n> The motivation for the original patch had more to do with \"windows people\"\n> using win32 text editors which set the executable bit inappropriately.\n> (see commit c869753e).\n>\n> Since I use cygwin tools (vim), I don't have this problem. :-D\nThis is a perfect use for the pre-commit script. I've been doing this \nfor years, changing line endings and executability based upon file type. \nThis could no doubt also be handled by gitattributes now as well. \n(Almost) all windows editors are perfectly happy with \\n line endings, \nand none I know of care about execute permissions. I strongly believe \nthat making the file line ending mode and execute status conform to \ncross-platform standards is the \"right\" approach rather than ignoring \nthese on Windows then making others on other platforms clean up the mess \nlater.\n\nMark\n"},{"id":"223766","messageId":"1374245631-15955-1-git-send-email-mlevedahl@gmail.com","threadId":"34435","inReplyTo":"1373818390-14451-1-git-send-email-mlevedahl@gmail.com","subject":"[PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T14:53:51Z","receivedAt":"2013-07-19T14:53:51Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"The supported Cygwin distribution on supported Windows versions provides\ncomplete support for POSIX filemodes, so enable this by default. git as\ndistributed by the Cygwin project is configured this way.\n\nThis fixes one testsuite failure:\nt3300 test 17 (diff-index -M -p with mode change quotes funny filename)\n\nHistorical notes: Cygwin version 1.7 supports Windows-XP and newer, thus \ndropped support for all OS variants that lack NTFS and/or the full win32 \napi, and since late 1.5 development, Cygwin maps POSIX modes to NTFS ACLs \nby default.  Cygwin 1.5 supported OS variants that used FAT as the native \nfile system, and had optional methods for providing POSIX file modes on \ntop of FAT12/16 and NTFS, though not FAT32.  Also, support for POSIX modes \non top of FAT were dropped later in 1.5.  Thus, POSIX filemode support \ncould not be expected by default on a Cygwin 1.5 installation, but is \nexpected by default on a 1.7 installation.\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\nJunio - The above notes are more accurate than in my previous commit message,\nso if this commit survives into next/master, I would prefer this version as\nopposed to the one now on pu (da875762)\n\nMark\n\n config.mak.uname | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 174703b..bf5db47 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -164,7 +164,6 @@ ifeq ($(uname_O),Cygwin)\n \tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n-\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n \t# There are conflicting reports about this.\n \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n-- \n1.8.3.2.0.13\n"},{"id":"223781","messageId":"7vtxjqwlj2.fsf@alter.siamese.dyndns.org","threadId":"34435","inReplyTo":"1374245631-15955-1-git-send-email-mlevedahl@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-19T16:40:33Z","receivedAt":"2013-07-19T16:40:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mark Levedahl <mlevedahl@gmail.com> writes:\n\n> Junio - The above notes are more accurate than in my previous commit message,\n> so if this commit survives into next/master, I would prefer this version as\n> opposed to the one now on pu (da875762)\n\nThanks, will replace.\n\nWhat do we want to do with the compat/regex build-time switch?\n\nIIRC, this was only needed for 1.7 and not 1.5, and I also would\nexpect (without anything to back-up, so this is more a faith than\nexpectation) over time the \"new library\" would have a working regex\nlibrary.\n\n>\n> Mark\n>\n>  config.mak.uname | 1 -\n>  1 file changed, 1 deletion(-)\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 174703b..bf5db47 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -164,7 +164,6 @@ ifeq ($(uname_O),Cygwin)\n>  \tNO_THREAD_SAFE_PREAD = YesPlease\n>  \tNEEDS_LIBICONV = YesPlease\n>  \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n> -\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n>  \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n>  \t# There are conflicting reports about this.\n>  \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n"},{"id":"223790","messageId":"51E982D0.5040505@gmail.com","threadId":"34435","inReplyTo":"7vtxjqwlj2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T18:17:52Z","receivedAt":"2013-07-19T18:17:52Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/19/2013 12:40 PM, Junio C Hamano wrote:\n> Thanks, will replace.\n>\n> What do we want to do with the compat/regex build-time switch?\n>\n> IIRC, this was only needed for 1.7 and not 1.5, and I also would\n> expect (without anything to back-up, so this is more a faith than\n> expectation) over time the \"new library\" would have a working regex\n> library.\n>\n\nThe situation is that Cygwin uses newlib rather than glibc, and does so \nfor licesnsing reasons (redhat sells licenses to developers allowing \nclosed source applications built using Cygwin). So, there must be a \ncompelling need to fix the library - git has a simple work around, so \nisn't the case. Also, Cygwin has a perl regex library for those \ndemanding more complete / correct regex solution. So, I make no \nprediction on when the newlib regex functions are fixed.\n\nRelated: Should we have separate settings for 1.5 and 1.7 for several \nvariables? Conflicts I see not reflected in config.mak.uname on pu:\n     trustable filemode   (1.7 has, 1.5 does not)\n     MMAP/Pread (1.7 pread is thread safe, 1.5 I dont think was, MMAP \nutility is convolved in this)\n     regex - 1.7 is broken, per Ramsay 1.5 works\n\nIf you think its worth it, I'll create a patch series with the above and \njustifications for the different settings that I know.\n\nMark\n"},{"id":"223796","messageId":"7vtxjquzqm.fsf@alter.siamese.dyndns.org","threadId":"34435","inReplyTo":"51E982D0.5040505@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-19T19:16:33Z","receivedAt":"2013-07-19T19:16:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mark Levedahl <mlevedahl@gmail.com> writes:\n\n> Related: Should we have separate settings for 1.5 and 1.7 for several\n> variables? Conflicts I see not reflected in config.mak.uname on pu:\n>     trustable filemode   (1.7 has, 1.5 does not)\n>     MMAP/Pread (1.7 pread is thread safe, 1.5 I dont think was, MMAP\n> utility is convolved in this)\n>     regex - 1.7 is broken, per Ramsay 1.5 works\n>\n> If you think its worth it, I'll create a patch series with the above\n> and justifications for the different settings that I know.\n\nI'd say that would be a sensible thing to do, given that the\nalternative seems to be \"let's drop 1.5 support right now, because\notherwise we cannot run Git on 1.7\".\n"},{"id":"223812","messageId":"51E9C69F.7080309@gmail.com","threadId":"34435","inReplyTo":"7vtxjquzqm.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T23:07:11Z","receivedAt":"2013-07-19T23:07:11Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/19/2013 03:16 PM, Junio C Hamano wrote:\n> Mark Levedahl <mlevedahl@gmail.com> writes:\n>\n>> Related: Should we have separate settings for 1.5 and 1.7 for several\n>> variables? Conflicts I see not reflected in config.mak.uname on pu:\n>>      trustable filemode   (1.7 has, 1.5 does not)\n>>      MMAP/Pread (1.7 pread is thread safe, 1.5 I dont think was, MMAP\n>> utility is convolved in this)\n>>      regex - 1.7 is broken, per Ramsay 1.5 works\n>>\n>> If you think its worth it, I'll create a patch series with the above\n>> and justifications for the different settings that I know.\n> I'd say that would be a sensible thing to do, given that the\n> alternative seems to be \"let's drop 1.5 support right now, because\n> otherwise we cannot run Git on 1.7\".\n>\n>\nOk, the following sequence builds up options for Cygwin 1.7 while \nleaving Cygwin 1.5 as-is. This series should replace\n\ndad577f Cygwin has trustable filemode\n174bb98 Use compat/regex on Cygwin\n\nAfter merging the following into current pu, all tests that run by \ndefault pass on Cygwin 1.7, i.e.\n     prove -j 8 t[0-9]*.sh\nreports \"All tests successful.\"\nI've *never* had this happen on Cygwin before.\n\nMark\n\n\nMark\n"},{"id":"223813","messageId":"1374275310-22388-1-git-send-email-mlevedahl@gmail.com","threadId":"34435","inReplyTo":"51E9C69F.7080309@gmail.com","subject":"[PATCH 1/4] Cygwin 1.7 has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T23:08:27Z","receivedAt":"2013-07-19T23:08:27Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"The current Cygwin 1.7 distribution on supported Windows versions provides\ncomplete support for POSIX filemodes, so enable this by default. git as\ndistributed by the Cygwin project is configured this way. Cygwin 1.5\ninstallations are less likely to have this support, so leave the old\ndefault in place for those.\n\nThis fixes one testsuite failure:\nt3300 test 17 (diff-index -M -p with mode change quotes funny filename)\n\nHistorical notes: Cygwin version 1.7 supports Windows-XP and newer, thus\ndropped support for all OS variants that lack NTFS and/or the full win32\napi, and since late 1.5 development, Cygwin maps POSIX modes to NTFS ACLs\nby default.  Cygwin 1.5 supports OS variants that use FAT as the native\nfile system, and had optional methods for providing POSIX file modes on\ntop of FAT12/16 and NTFS, though not FAT32.  Also, support for POSIX modes\non top of FAT were dropped later in 1.5.  Thus, POSIX filemode support\nis not expected by default on a Cygwin 1.5 installation, but is expected\nby default on a 1.7 installation.\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\n config.mak.uname | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 7ac541e..104dc44 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -158,12 +158,12 @@ ifeq ($(uname_O),Cygwin)\n \t\tNO_MKSTEMPS = YesPlease\n \t\tNO_SYMLINK_HEAD = YesPlease\n \t\tNO_IPV6 = YesPlease\n+\t\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \t\tOLD_ICONV = UnfortunatelyYes\n \tendif\n \tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n-\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n \t# There are conflicting reports about this.\n \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n-- \n1.8.3.2.0.13\n"},{"id":"223814","messageId":"1374275310-22388-2-git-send-email-mlevedahl@gmail.com","threadId":"34435","inReplyTo":"51E9C69F.7080309@gmail.com","subject":"[PATCH 2/4] Cygwin 1.7 needs compat/regex","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T23:08:28Z","receivedAt":"2013-07-19T23:08:28Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"Cygwin v1.7 uses the regex library from newlib which does not pass git's\ntests, so don't use it. This fixes failures in t4018 and t4034.\n\nContinue to use the platform supplied regex library for earlier versions.\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\n config.mak.uname | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 104dc44..8652da9 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -160,6 +160,8 @@ ifeq ($(uname_O),Cygwin)\n \t\tNO_IPV6 = YesPlease\n \t\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \t\tOLD_ICONV = UnfortunatelyYes\n+\telse\n+\t\tNO_REGEX = UnfortunatelyYes\n \tendif\n \tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n-- \n1.8.3.2.0.13\n"},{"id":"223815","messageId":"1374275310-22388-3-git-send-email-mlevedahl@gmail.com","threadId":"34435","inReplyTo":"51E9C69F.7080309@gmail.com","subject":"[PATCH 3/4] Cygwin 1.7 has thread-safe pread","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T23:08:29Z","receivedAt":"2013-07-19T23:08:29Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"Per http://cygwin.com/ml/cygwin/2012-07/msg00331.html , cygwin 1.7\nwas modified to explicitly support git's use of pread, so make this\nthe default. Do not affect earlier cygwin versions.\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\n config.mak.uname | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 8652da9..048c252 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -160,10 +160,10 @@ ifeq ($(uname_O),Cygwin)\n \t\tNO_IPV6 = YesPlease\n \t\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \t\tOLD_ICONV = UnfortunatelyYes\n+\t\tNO_THREAD_SAFE_PREAD = YesPlease\n \telse\n \t\tNO_REGEX = UnfortunatelyYes\n \tendif\n-\tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n-- \n1.8.3.2.0.13\n"},{"id":"223816","messageId":"1374275310-22388-4-git-send-email-mlevedahl@gmail.com","threadId":"34435","inReplyTo":"51E9C69F.7080309@gmail.com","subject":"[PATCH 4/4] Cygwin 1.7 supports mmap","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-19T23:08:30Z","receivedAt":"2013-07-19T23:08:30Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"git has shipped for years with MMAP enabled in the stock distribution,\nthere are no reports of problems / failures on the list relating to\nthis. Leave the default as-is on v1.5 due to lack of knowlege of this\nworking on earlier Cygwin.\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\n---\n config.mak.uname | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 048c252..32e8332 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -161,16 +161,16 @@ ifeq ($(uname_O),Cygwin)\n \t\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \t\tOLD_ICONV = UnfortunatelyYes\n \t\tNO_THREAD_SAFE_PREAD = YesPlease\n+\t\t# There are conflicting reports about this.\n+\t\t# On some boxes NO_MMAP is needed, and not so elsewhere.\n+\t\t# Try commenting this out if you suspect MMAP is more efficient\n+\t\tNO_MMAP = YesPlease\n \telse\n \t\tNO_REGEX = UnfortunatelyYes\n \tendif\n \tNEEDS_LIBICONV = YesPlease\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n-\t# There are conflicting reports about this.\n-\t# On some boxes NO_MMAP is needed, and not so elsewhere.\n-\t# Try commenting this out if you suspect MMAP is more efficient\n-\tNO_MMAP = YesPlease\n \tX = .exe\n \tCOMPAT_OBJS += compat/cygwin.o\n \tUNRELIABLE_FSTAT = UnfortunatelyYes\n-- \n1.8.3.2.0.13\n"},{"id":"223817","messageId":"20130719230956.GB14690@google.com","threadId":"34435","inReplyTo":"51E9C69F.7080309@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-19T23:09:56Z","receivedAt":"2013-07-19T23:09:56Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Mark Levedahl wrote:\n\n> After merging the following into current pu, all tests that run by\n> default pass on Cygwin 1.7, i.e.\n>     prove -j 8 t[0-9]*.sh\n> reports \"All tests successful.\"\n> I've *never* had this happen on Cygwin before.\n\nNice.  Thanks for your hard work.\n"},{"id":"223881","messageId":"51EAEA76.9060502@ramsay1.demon.co.uk","threadId":"34435","inReplyTo":"1374245631-15955-1-git-send-email-mlevedahl@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-07-20T19:52:22Z","receivedAt":"2013-07-20T19:52:22Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Mark Levedahl wrote:\n> The supported Cygwin distribution on supported Windows versions provides\n> complete support for POSIX filemodes, so enable this by default. git as\n> distributed by the Cygwin project is configured this way.\n> \n> This fixes one testsuite failure:\n> t3300 test 17 (diff-index -M -p with mode change quotes funny filename)\n> \n> Historical notes: Cygwin version 1.7 supports Windows-XP and newer, thus \n> dropped support for all OS variants that lack NTFS and/or the full win32 \n> api, and since late 1.5 development, Cygwin maps POSIX modes to NTFS ACLs \n> by default.  Cygwin 1.5 supported OS variants that used FAT as the native \n> file system, and had optional methods for providing POSIX file modes on \n> top of FAT12/16 and NTFS, though not FAT32.  Also, support for POSIX modes \n> on top of FAT were dropped later in 1.5.  Thus, POSIX filemode support \n> could not be expected by default on a Cygwin 1.5 installation, but is \n> expected by default on a 1.7 installation.\n> \n> Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>\n> ---\n> Junio - The above notes are more accurate than in my previous commit message,\n> so if this commit survives into next/master, I would prefer this version as\n> opposed to the one now on pu (da875762)\n\nAgain, I have to ask; should you not \"revert\" commit c869753e (\"Force core.filemode\nto false on Cygwin.\", 30-12-2006)?  After this commit, there is no longer any user\nof the NO_TRUSTABLE_FILEMODE build variable, and no real prospect of anyone else\nwanting to use it.\n\nATB,\nRamsay Jones\n"},{"id":"223860","messageId":"51EAEF1B.6090300@ramsay1.demon.co.uk","threadId":"34435","inReplyTo":"51E982D0.5040505@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-07-20T20:12:11Z","receivedAt":"2013-07-20T20:12:11Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Mark Levedahl wrote:\n> On 07/19/2013 12:40 PM, Junio C Hamano wrote:\n>> Thanks, will replace.\n>>\n>> What do we want to do with the compat/regex build-time switch?\n>>\n>> IIRC, this was only needed for 1.7 and not 1.5, and I also would\n>> expect (without anything to back-up, so this is more a faith than\n>> expectation) over time the \"new library\" would have a working regex\n>> library.\n>>\n> \n> The situation is that Cygwin uses newlib rather than glibc, and does so \n> for licesnsing reasons (redhat sells licenses to developers allowing \n> closed source applications built using Cygwin). So, there must be a \n> compelling need to fix the library - git has a simple work around, so \n> isn't the case. Also, Cygwin has a perl regex library for those \n> demanding more complete / correct regex solution. So, I make no \n> prediction on when the newlib regex functions are fixed.\n> \n> Related: Should we have separate settings for 1.5 and 1.7 for several \n> variables?\n\nWe already do.\n\n>               Conflicts I see not reflected in config.mak.uname on pu:\n>      trustable filemode   (1.7 has, 1.5 does not)\n\nI see no need for any difference here. puzzled.\n\n>      MMAP/Pread (1.7 pread is thread safe, 1.5 I dont think was, MMAP \n> utility is convolved in this)\n\npread() is now thread-safe? great! (It must have been a fairly recent\nchange; last time I looked it was still not thread-safe on 1.7.)\n\n>      regex - 1.7 is broken, per Ramsay 1.5 works\n\nI don't see any reason not to use the compat/regex routines on both\ncygwin 1.5 and 1.7.  However, I wouldn't object to restricting the use\nof the compat routines to cygwin 1.7 either!\n\n> If you think its worth it, I'll create a patch series with the above and \n> justifications for the different settings that I know.\n\nAs far as I can see, only the pread() and maybe MMAP and regex setting\nneed to change from the current setup.\n\nATB,\nRamsay Jones\n"},{"id":"223891","messageId":"7v7ggjshk7.fsf@alter.siamese.dyndns.org","threadId":"34435","inReplyTo":"51EAEA76.9060502@ramsay1.demon.co.uk","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-21T21:56:40Z","receivedAt":"2013-07-21T21:56:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> Mark Levedahl wrote:\n>> The supported Cygwin distribution on supported Windows versions provides\n>> complete support for POSIX filemodes, so enable this by default.\n>> ...\n>> Historical notes: Cygwin version 1.7 supports Windows-XP and newer, thus \n>> dropped support for all OS variants that lack NTFS and/or ...\n>> ...  Thus, POSIX filemode support \n>> could not be expected by default on a Cygwin 1.5 installation, but is \n>> expected by default on a 1.7 installation.\n>> \n> Again, I have to ask; should you not \"revert\" commit c869753e (\"Force core.filemode\n> to false on Cygwin.\", 30-12-2006)?  After this commit, there is no longer any user\n> of the NO_TRUSTABLE_FILEMODE build variable, and no real prospect of anyone else\n> wanting to use it.\n\nThanks for raising this point.\n\nReading c869753e once again:\n\n    The issue is that Cygwin and NTFS correctly supports the\n    executable mode bit, and Git properly detected that, but most\n    native Windows applications tend to create files such that\n    Cygwin sees the executable bit set when it probably shouldn't\n    be.\n\nIn other words, the reason why \"NO_TRUSTABLE_FILEMODE\" was added was\nnot because the Cygwin did not give us reliable filemodes.  It was\nbecause tools outside the control of Git and/or Cygwin that users\nuse tend to misbehave, even when the working tree is on a filesystem\non which Cygwin can give us trustable filemodes.\n\nSo \"1.7 always supports core.filemodes correctly because it no\nlonger works on filesystems without trustable filemodes\" is not a\nvalid reason to justify Mark's change.\n\nThere are only three possible ways going forward, I think:\n\n (A) Drop Mark's patch, and do nothing else, because breakages of\n     other people's programs are not fixed by Cygwin 1.7's improved\n     filesystem support, and users still use those mode breaking\n     programs written by others;\n\n (B) Drop Mark's patch, and revert c869753e, because it is not the\n     business of our project to sweep breakages of other people's\n     tools under the rug by crippling our software; or\n\n (C) Drop NO_TRUSTABLE_FILEMODE for _all_ versions of Cygwin,\n     declaring that the spirit of c869753e to work around bugs in\n     other people's software by crippling Git is justified, but that\n     it is no longer necessary on Cygwin because people do not use\n     such misbehaving third-party tools anymore.\n\nThese three each rely on its own precondition; I suspect it is\nlikely that (A)'s is the most accurate description of the real world.\n"},{"id":"223903","messageId":"51ECA746.7040702@gmail.com","threadId":"34435","inReplyTo":"7v7ggjshk7.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-22T03:30:14Z","receivedAt":"2013-07-22T03:30:14Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/21/2013 05:56 PM, Junio C Hamano wrote:\n> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n>\n>> Mark Levedahl wrote:\n>>> The supported Cygwin distribution on supported Windows versions provides\n>>> complete support for POSIX filemodes, so enable this by default.\n>>> ...\n>>> Historical notes: Cygwin version 1.7 supports Windows-XP and newer, thus\n>>> dropped support for all OS variants that lack NTFS and/or ...\n>>> ...  Thus, POSIX filemode support\n>>> could not be expected by default on a Cygwin 1.5 installation, but is\n>>> expected by default on a 1.7 installation.\n>>>\n>> Again, I have to ask; should you not \"revert\" commit c869753e (\"Force core.filemode\n>> to false on Cygwin.\", 30-12-2006)?  After this commit, there is no longer any user\n>> of the NO_TRUSTABLE_FILEMODE build variable, and no real prospect of anyone else\n>> wanting to use it.\n> Thanks for raising this point.\n>\n> Reading c869753e once again:\n>\n>      The issue is that Cygwin and NTFS correctly supports the\n>      executable mode bit, and Git properly detected that, but most\n>      native Windows applications tend to create files such that\n>      Cygwin sees the executable bit set when it probably shouldn't\n>      be.\n>\n> In other words, the reason why \"NO_TRUSTABLE_FILEMODE\" was added was\n> not because the Cygwin did not give us reliable filemodes.  It was\n> because tools outside the control of Git and/or Cygwin that users\n> use tend to misbehave, even when the working tree is on a filesystem\n> on which Cygwin can give us trustable filemodes.\n>\n> So \"1.7 always supports core.filemodes correctly because it no\n> longer works on filesystems without trustable filemodes\" is not a\n> valid reason to justify Mark's change.\n>\n> There are only three possible ways going forward, I think:\n>\n>   (A) Drop Mark's patch, and do nothing else, because breakages of\n>       other people's programs are not fixed by Cygwin 1.7's improved\n>       filesystem support, and users still use those mode breaking\n>       programs written by others;\n>\n>   (B) Drop Mark's patch, and revert c869753e, because it is not the\n>       business of our project to sweep breakages of other people's\n>       tools under the rug by crippling our software; or\n>\n>   (C) Drop NO_TRUSTABLE_FILEMODE for _all_ versions of Cygwin,\n>       declaring that the spirit of c869753e to work around bugs in\n>       other people's software by crippling Git is justified, but that\n>       it is no longer necessary on Cygwin because people do not use\n>       such misbehaving third-party tools anymore.\n>\n> These three each rely on its own precondition; I suspect it is\n> likely that (A)'s is the most accurate description of the real world.\n>\n\nPerhaps the simplest approach is to just defer to the judgement of the \nCygwin project maintainers here.\n\na) The Cygwin project has its stated objective of being as matching Linux.\nb) The Cygwin project has always shipped git binaries built without \nNO_TRUSTABLE_FILEMODE\n\nAlso - users who do not want Cygwin's assumptions / environment are now \nfree to use the msysgit version and frankly they should be so encouraged \n- it is faster than Cygwin's git. This option was not available in 2006.\n\nMark\n"},{"id":"223904","messageId":"7vli4zqjap.fsf@alter.siamese.dyndns.org","threadId":"34435","inReplyTo":"51ECA746.7040702@gmail.com","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-22T05:02:06Z","receivedAt":"2013-07-22T05:02:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mark Levedahl <mlevedahl@gmail.com> writes:\n\n> On 07/21/2013 05:56 PM, Junio C Hamano wrote:\n> ...\n>> There are only three possible ways going forward, I think:\n>>\n>>   (A) Drop Mark's patch, and do nothing else, because breakages of\n>>       other people's programs are not fixed by Cygwin 1.7's improved\n>>       filesystem support, and users still use those mode breaking\n>>       programs written by others;\n>>\n>>   (B) Drop Mark's patch, and revert c869753e, because it is not the\n>>       business of our project to sweep breakages of other people's\n>>       tools under the rug by crippling our software; or\n>>\n>>   (C) Drop NO_TRUSTABLE_FILEMODE for _all_ versions of Cygwin,\n>>       declaring that the spirit of c869753e to work around bugs in\n>>       other people's software by crippling Git is justified, but that\n>>       it is no longer necessary on Cygwin because people do not use\n>>       such misbehaving third-party tools anymore.\n>>\n>> These three each rely on its own precondition; I suspect it is\n>> likely that (A)'s is the most accurate description of the real world.\n>\n> Perhaps the simplest approach is to just defer to the judgement of the\n> Cygwin project maintainers here.\n>\n> a) The Cygwin project has its stated objective of being as matching Linux.\n\nThat does not say much.  On Linux, third-party \"native Windows\napplications\" that necessitated c869753e (Force core.filemode to\nfalse on Cygwin., 2006-12-30) to help users is not an issue.  On\nCygwin, it still is.\n\n> b) The Cygwin project has always shipped git binaries built without\n> NO_TRUSTABLE_FILEMODE\n\nThat is a fair point.  So let's do this instead.\n\n-- >8 --\nFrom: Mark Levedahl <mlevedahl@gmail.com>\nSubject: [PATCH] cygwin: stop forcing core.filemode=false\n\nWe force core.filemode=false since c869753e (Force core.filemode to\nfalse on Cygwin., 2006-12-30), even when the repository is on a\nfilesystem on which Cygwin can give us trustable filemodes, because\nmany native Windows applications the users use to edit files in the\nworking tree tend to (re)create files with executable bit randomly\nset or reset.  However, binary distribution of Git that is supplied\nby the downstream project to its users has been built without this\nconsideration.\n\nDrop NO_TRUSTABLE_FILEMODE from our default configuration so that\nhand-compiled Git out of box will match theirs.\n\nSigned-off-by: Mark Levedahl <mlevedahl@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n config.mak.uname | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 7ac541e..779d06a 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -163,7 +163,6 @@ ifeq ($(uname_O),Cygwin)\n \tNO_THREAD_SAFE_PREAD = YesPlease\n \tNEEDS_LIBICONV = YesPlease\n \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n-\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n \t# There are conflicting reports about this.\n \t# On some boxes NO_MMAP is needed, and not so elsewhere.\n-- \n1.8.3.3-1030-g100bb15\n"},{"id":"223946","messageId":"51EDB0BB.3030605@gmail.com","threadId":"34435","inReplyTo":"7vli4zqjap.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Cygwin has trustable filemode","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-22T22:22:51Z","receivedAt":"2013-07-22T22:22:51Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/22/2013 01:02 AM, Junio C Hamano wrote:\n>> b) The Cygwin project has always shipped git binaries built without\n>> NO_TRUSTABLE_FILEMODE\n> That is a fair point.  So let's do this instead.\n>\n> -- >8 --\n> From: Mark Levedahl <mlevedahl@gmail.com>\n> Subject: [PATCH] cygwin: stop forcing core.filemode=false\n>\n> We force core.filemode=false since c869753e (Force core.filemode to\n> false on Cygwin., 2006-12-30), even when the repository is on a\n> filesystem on which Cygwin can give us trustable filemodes, because\n> many native Windows applications the users use to edit files in the\n> working tree tend to (re)create files with executable bit randomly\n> set or reset.  However, binary distribution of Git that is supplied\n> by the downstream project to its users has been built without this\n> consideration.\n>\n> Drop NO_TRUSTABLE_FILEMODE from our default configuration so that\n> hand-compiled Git out of box will match theirs.\n>\n> Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>   config.mak.uname | 1 -\n>   1 file changed, 1 deletion(-)\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 7ac541e..779d06a 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -163,7 +163,6 @@ ifeq ($(uname_O),Cygwin)\n>   \tNO_THREAD_SAFE_PREAD = YesPlease\n>   \tNEEDS_LIBICONV = YesPlease\n>   \tNO_FAST_WORKING_DIRECTORY = UnfortunatelyYes\n> -\tNO_TRUSTABLE_FILEMODE = UnfortunatelyYes\n>   \tNO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease\n>   \t# There are conflicting reports about this.\n>   \t# On some boxes NO_MMAP is needed, and not so elsewhere.\nok by me.\n\nMark\n"}]}