{"thread":{"id":"26420","subject":"ignoring file modes completely","startedAt":"2011-02-05T15:24:50Z","lastAt":"2011-02-06T20:29:56Z","messageCount":10,"participants":["Rafael Kitover","Jared Hance","Andreas Ericsson","Michael J Gruber","Dmitry Potapov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"160446","messageId":"4D4D6BC2.90101@io.com","threadId":"26420","inReplyTo":null,"subject":"ignoring file modes completely","fromName":"Rafael Kitover","fromEmail":"rkitover@io.com","sentAt":"2011-02-05T15:24:50Z","receivedAt":"2011-02-05T15:24:50Z","isPatch":false,"sender":{"key":"rkitover@io.com","avatar":null},"body":"Hello,\n\nI found the core.filemode option, which ignores executable bits, but I \nneed an option to ignore all mode differences, and such an option does \nnot seem to exist.\n\nThe reason for this is that I'm trying to use msysGit with Cygwin git, \nsometimes to work with an msysGit clone in cygwin or to work with a \nCygwin git clone in msysGit. For example, I would like to use \"git \ncpan-init\" under Cygwin, then use msysGit to work with the repository, \nthis is currently impossible.\n\nHere is \"git status\" on a repo made with Cygwin git under msysGit:\n\n$ git status\n# On branch master\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working \ndirectory)\n#\n#       modified:   Makefile.PL\n#       modified:   t/02ads.t\n#       modified:   t/02cxn.t\n#       modified:   t/04os.t\n...\n...\n\nEvery file is modified because the modes do not match :(\n\nWould it be possible to add some sort of option to ignore all file mode \nchanges?\n"},{"id":"160447","messageId":"1296921829.5467.1.camel@localhost.localdomain","threadId":"26420","inReplyTo":"4D4D6BC2.90101@io.com","subject":"Re: ignoring file modes completely","fromName":"Jared Hance","fromEmail":"jaredhance@gmail.com","sentAt":"2011-02-05T16:03:49Z","receivedAt":"2011-02-05T16:03:49Z","isPatch":false,"sender":{"key":"jaredhance@gmail.com","avatar":"https://avatars.githubusercontent.com/u/170192?v=4"},"body":"On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote: \n> Hello,\n> \n> I found the core.filemode option, which ignores executable bits, but I \n> need an option to ignore all mode differences, and such an option does \n> not seem to exist.\n\nThe only mode tracked by Git is the executable bit, so this shouldn't\neven be an issue. Are you sure the executable bit isn't the problem?\n"},{"id":"160448","messageId":"4D4D7636.7090608@io.com","threadId":"26420","inReplyTo":"1296921829.5467.1.camel@localhost.localdomain","subject":"Re: ignoring file modes completely","fromName":"Rafael Kitover","fromEmail":"rkitover@io.com","sentAt":"2011-02-05T16:09:26Z","receivedAt":"2011-02-05T16:09:26Z","isPatch":false,"sender":{"key":"rkitover@io.com","avatar":null},"body":"On 2/5/2011 11:03 AM, Jared Hance wrote:\n> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:\n>> Hello,\n>>\n>> I found the core.filemode option, which ignores executable bits, but I\n>> need an option to ignore all mode differences, and such an option does\n>> not seem to exist.\n>\n> The only mode tracked by Git is the executable bit, so this shouldn't\n> even be an issue. Are you sure the executable bit isn't the problem?\n>\n$ git config --global core.filemode\nfalse\n\nOutput of \"git diff HEAD\" :\n\ndiff --git a/Makefile.PL b/Makefile.PL\nold mode 100755\nnew mode 100644\ndiff --git a/t/02ads.t b/t/02ads.t\nold mode 100755\nnew mode 100644\ndiff --git a/t/02cxn.t b/t/02cxn.t\nold mode 100755\nnew mode 100644\ndiff --git a/t/04os.t b/t/04os.t\nold mode 100755\nnew mode 100644\n...\n...\n"},{"id":"160450","messageId":"4D4D81C9.5080002@op5.se","threadId":"26420","inReplyTo":"4D4D7636.7090608@io.com","subject":"Re: ignoring file modes completely","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2011-02-05T16:58:49Z","receivedAt":"2011-02-05T16:58:49Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"On 02/05/2011 05:09 PM, Rafael Kitover wrote:\n> On 2/5/2011 11:03 AM, Jared Hance wrote:\n>> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:\n>>> Hello,\n>>>\n>>> I found the core.filemode option, which ignores executable bits, but I\n>>> need an option to ignore all mode differences, and such an option does\n>>> not seem to exist.\n>>\n>> The only mode tracked by Git is the executable bit, so this shouldn't\n>> even be an issue. Are you sure the executable bit isn't the problem?\n>>\n> $ git config --global core.filemode\n> false\n> \n> Output of \"git diff HEAD\" :\n> \n> diff --git a/Makefile.PL b/Makefile.PL\n> old mode 100755\n> new mode 100644\n> diff --git a/t/02ads.t b/t/02ads.t\n> old mode 100755\n> new mode 100644\n> diff --git a/t/02cxn.t b/t/02cxn.t\n> old mode 100755\n> new mode 100644\n> diff --git a/t/04os.t b/t/04os.t\n> old mode 100755\n> new mode 100644\n\nThose are all executable bit diffs.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"160463","messageId":"4D4DA4C1.5050501@io.com","threadId":"26420","inReplyTo":"4D4D81C9.5080002@op5.se","subject":"Re: ignoring file modes completely","fromName":"Rafael Kitover","fromEmail":"rkitover@io.com","sentAt":"2011-02-05T19:28:01Z","receivedAt":"2011-02-05T19:28:01Z","isPatch":false,"sender":{"key":"rkitover@io.com","avatar":null},"body":"On 2/5/2011 11:58 AM, Andreas Ericsson wrote:\n> On 02/05/2011 05:09 PM, Rafael Kitover wrote:\n>> On 2/5/2011 11:03 AM, Jared Hance wrote:\n>>> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:\n>>>> Hello,\n>>>>\n>>>> I found the core.filemode option, which ignores executable bits, but I\n>>>> need an option to ignore all mode differences, and such an option does\n>>>> not seem to exist.\n>>>\n>>> The only mode tracked by Git is the executable bit, so this shouldn't\n>>> even be an issue. Are you sure the executable bit isn't the problem?\n>>>\n>> $ git config --global core.filemode\n>> false\n>>\n>> Output of \"git diff HEAD\" :\n>>\n>> diff --git a/Makefile.PL b/Makefile.PL\n>> old mode 100755\n>> new mode 100644\n>> diff --git a/t/02ads.t b/t/02ads.t\n>> old mode 100755\n>> new mode 100644\n>> diff --git a/t/02cxn.t b/t/02cxn.t\n>> old mode 100755\n>> new mode 100644\n>> diff --git a/t/04os.t b/t/04os.t\n>> old mode 100755\n>> new mode 100644\n>\n> Those are all executable bit diffs.\n>\n\nOk, but I have core.filemode set to \"false\" as I showed, why does this \nhappen then?\n"},{"id":"160492","messageId":"4D4E9EAC.4030508@drmicha.warpmail.net","threadId":"26420","inReplyTo":"4D4DA4C1.5050501@io.com","subject":"Re: ignoring file modes completely","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-02-06T13:14:20Z","receivedAt":"2011-02-06T13:14:20Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Rafael Kitover venit, vidit, dixit 05.02.2011 20:28:\n> On 2/5/2011 11:58 AM, Andreas Ericsson wrote:\n>> On 02/05/2011 05:09 PM, Rafael Kitover wrote:\n>>> On 2/5/2011 11:03 AM, Jared Hance wrote:\n>>>> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:\n>>>>> Hello,\n>>>>>\n>>>>> I found the core.filemode option, which ignores executable bits, but I\n>>>>> need an option to ignore all mode differences, and such an option does\n>>>>> not seem to exist.\n>>>>\n>>>> The only mode tracked by Git is the executable bit, so this shouldn't\n>>>> even be an issue. Are you sure the executable bit isn't the problem?\n>>>>\n>>> $ git config --global core.filemode\n>>> false\n>>>\n>>> Output of \"git diff HEAD\" :\n>>>\n>>> diff --git a/Makefile.PL b/Makefile.PL\n>>> old mode 100755\n>>> new mode 100644\n>>> diff --git a/t/02ads.t b/t/02ads.t\n>>> old mode 100755\n>>> new mode 100644\n>>> diff --git a/t/02cxn.t b/t/02cxn.t\n>>> old mode 100755\n>>> new mode 100644\n>>> diff --git a/t/04os.t b/t/04os.t\n>>> old mode 100755\n>>> new mode 100644\n>>\n>> Those are all executable bit diffs.\n>>\n> \n> Ok, but I have core.filemode set to \"false\" as I showed, why does this \n> happen then?\n\nI can't confirm this on linux with current git. What are your versions?\nDo you have a minimal example (starting from git init)?\n\nMichael\n\nBTW: Leaving out helpful folks from cc does not help... I should not\nhave to re-add them by hand.\n"},{"id":"160497","messageId":"4D4EC3FD.5010000@io.com","threadId":"26420","inReplyTo":"4D4E9EAC.4030508@drmicha.warpmail.net","subject":"Re: ignoring file modes completely","fromName":"Rafael Kitover","fromEmail":"rkitover@io.com","sentAt":"2011-02-06T15:53:33Z","receivedAt":"2011-02-06T15:53:33Z","isPatch":false,"sender":{"key":"rkitover@io.com","avatar":null},"body":"On 2/6/2011 8:14 AM, Michael J Gruber wrote:\n> Rafael Kitover venit, vidit, dixit 05.02.2011 20:28:\n>> On 2/5/2011 11:58 AM, Andreas Ericsson wrote:\n>>> On 02/05/2011 05:09 PM, Rafael Kitover wrote:\n>>>> On 2/5/2011 11:03 AM, Jared Hance wrote:\n>>>>> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:\n>>>>>> Hello,\n>>>>>>\n>>>>>> I found the core.filemode option, which ignores executable bits, but I\n>>>>>> need an option to ignore all mode differences, and such an option does\n>>>>>> not seem to exist.\n>>>>>\n>>>>> The only mode tracked by Git is the executable bit, so this shouldn't\n>>>>> even be an issue. Are you sure the executable bit isn't the problem?\n>>>>>\n>>>> $ git config --global core.filemode\n>>>> false\n>>>>\n>>>> Output of \"git diff HEAD\" :\n>>>>\n>>>> diff --git a/Makefile.PL b/Makefile.PL\n>>>> old mode 100755\n>>>> new mode 100644\n>>>> diff --git a/t/02ads.t b/t/02ads.t\n>>>> old mode 100755\n>>>> new mode 100644\n>>>> diff --git a/t/02cxn.t b/t/02cxn.t\n>>>> old mode 100755\n>>>> new mode 100644\n>>>> diff --git a/t/04os.t b/t/04os.t\n>>>> old mode 100755\n>>>> new mode 100644\n>>>\n>>> Those are all executable bit diffs.\n>>>\n>>\n>> Ok, but I have core.filemode set to \"false\" as I showed, why does this\n>> happen then?\n>\n> I can't confirm this on linux with current git. What are your versions?\n> Do you have a minimal example (starting from git init)?\n\nThis is msysGit:\n\n$ git --version\ngit version 1.7.3.1\n\nI can't replicate this with just \"git init\" and a file, it seems to \nhappen when I use \"git cpan-init\" in Cygwin then look at the repo in \nmsysGit.\n"},{"id":"160499","messageId":"4D4EC8E6.2090200@io.com","threadId":"26420","inReplyTo":"4D4EC3FD.5010000@io.com","subject":"Re: ignoring file modes completely","fromName":"Rafael Kitover","fromEmail":"rkitover@io.com","sentAt":"2011-02-06T16:14:30Z","receivedAt":"2011-02-06T16:14:30Z","isPatch":false,"sender":{"key":"rkitover@io.com","avatar":null},"body":"On 2/6/2011 10:53 AM, Rafael Kitover wrote:\n> On 2/6/2011 8:14 AM, Michael J Gruber wrote:\n>> Rafael Kitover venit, vidit, dixit 05.02.2011 20:28:\n>>> On 2/5/2011 11:58 AM, Andreas Ericsson wrote:\n>>>> On 02/05/2011 05:09 PM, Rafael Kitover wrote:\n>>>>> On 2/5/2011 11:03 AM, Jared Hance wrote:\n>>>>>> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:\n>>>>>>> Hello,\n>>>>>>>\n>>>>>>> I found the core.filemode option, which ignores executable bits,\n>>>>>>> but I\n>>>>>>> need an option to ignore all mode differences, and such an option\n>>>>>>> does\n>>>>>>> not seem to exist.\n>>>>>>\n>>>>>> The only mode tracked by Git is the executable bit, so this shouldn't\n>>>>>> even be an issue. Are you sure the executable bit isn't the problem?\n>>>>>>\n>>>>> $ git config --global core.filemode\n>>>>> false\n>>>>>\n>>>>> Output of \"git diff HEAD\" :\n>>>>>\n>>>>> diff --git a/Makefile.PL b/Makefile.PL\n>>>>> old mode 100755\n>>>>> new mode 100644\n>>>>> diff --git a/t/02ads.t b/t/02ads.t\n>>>>> old mode 100755\n>>>>> new mode 100644\n>>>>> diff --git a/t/02cxn.t b/t/02cxn.t\n>>>>> old mode 100755\n>>>>> new mode 100644\n>>>>> diff --git a/t/04os.t b/t/04os.t\n>>>>> old mode 100755\n>>>>> new mode 100644\n>>>>\n>>>> Those are all executable bit diffs.\n>>>>\n>>>\n>>> Ok, but I have core.filemode set to \"false\" as I showed, why does this\n>>> happen then?\n>>\n>> I can't confirm this on linux with current git. What are your versions?\n>> Do you have a minimal example (starting from git init)?\n>\n> This is msysGit:\n>\n> $ git --version\n> git version 1.7.3.1\n>\n> I can't replicate this with just \"git init\" and a file, it seems to\n> happen when I use \"git cpan-init\" in Cygwin then look at the repo in\n> msysGit.\n\nActually, I can replicate this in Cygwin git:\n\n$ git --version\ngit version 1.7.3.3\n\n$ cd ~/src\n$ mkdir test-repo\n$ cd test-repo\n$ git init\n$ touch README\n$ git add README\n$ git commit -a -m'test commit'\n$ git diff HEAD\n$ chmod +x README\n$ git diff HEAD\ndiff --git a/README b/README\nold mode 100644\nnew mode 100755\n$ git config --global core.filemode\nfalse\n\nThe way the executable bit works seems to be different between Cygwin \nand msys, but in either case core.filemode seems to not be working properly.\n"},{"id":"160507","messageId":"AANLkTikCKZetZXRCZSLiM73engBcyxNfCtBN5yWdEgRs@mail.gmail.com","threadId":"26420","inReplyTo":"4D4EC8E6.2090200@io.com","subject":"Re: ignoring file modes completely","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2011-02-06T18:10:37Z","receivedAt":"2011-02-06T18:10:37Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sun, Feb 06, 2011 at 11:14:30AM -0500, Rafael Kitover wrote:\n> $ git diff HEAD\n> diff --git a/README b/README\n> old mode 100644\n> new mode 100755\n> $ git config --global core.filemode\n> false\n\nThis is because core.filemode is set in the local configuration:\n$ git config core.filemode\ntrue\n\nGit automatically detects if chmod(2) is supported on the current file\nsystem and sets core.filemode to the corresponding value. Because cygwin\nemulates chmod(), git sets core.filemode to true.\n\nDmitry\n"},{"id":"160546","messageId":"4D4F04C4.6020401@io.com","threadId":"26420","inReplyTo":"AANLkTikCKZetZXRCZSLiM73engBcyxNfCtBN5yWdEgRs@mail.gmail.com","subject":"Re: ignoring file modes completely","fromName":"Rafael Kitover","fromEmail":"rkitover@io.com","sentAt":"2011-02-06T20:29:56Z","receivedAt":"2011-02-06T20:29:56Z","isPatch":false,"sender":{"key":"rkitover@io.com","avatar":null},"body":"On 2/6/2011 1:10 PM, Dmitry Potapov wrote:\n> On Sun, Feb 06, 2011 at 11:14:30AM -0500, Rafael Kitover wrote:\n>> $ git diff HEAD\n>> diff --git a/README b/README\n>> old mode 100644\n>> new mode 100755\n>> $ git config --global core.filemode\n>> false\n>\n> This is because core.filemode is set in the local configuration:\n> $ git config core.filemode\n> true\n>\n> Git automatically detects if chmod(2) is supported on the current file\n> system and sets core.filemode to the corresponding value. Because cygwin\n> emulates chmod(), git sets core.filemode to true.\n\nThat was it! Thank you very much. I can now use msysGit and Cygwin git \ntogether, very cool.\n"}]}