{"thread":{"id":"42393","subject":"Odd Difference Between Windows Git and Standard Git","startedAt":"2016-05-20T01:48:18Z","lastAt":"2016-05-25T11:52:38Z","messageCount":17,"participants":["Jon Forrest","Torsten Bögershausen","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"287056","messageId":"nhlqd4$ekr$1@ger.gmane.org","threadId":"42393","inReplyTo":null,"subject":"Odd Difference Between Windows Git and Standard Git","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2016-05-20T01:48:18Z","receivedAt":"2016-05-20T01:48:18Z","isPatch":false,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"I'm running Git version 2.8.2 built from source on Ubuntu 16.04.\nI'm using a repository that's stored on Dropbox. I'm the only person\naccessing this repo. Everything works great.\n\nFor reasons unrelated to Git, I decided to try Git for Windows,\nso I installed \"git version 2.8.2.windows.1\" on Windows 10.\nWhen I run 'git status' on Ubuntu the list I see is exactly what\nI expect. However, when I run 'git status' on the\nsame Dropbox repo on Windows, I see what I expect plus I'm told\nthat every .pdf file and some .png files are modified.\n\nI'm guessing that this is caused by some mishandling of\nbinary files. Is this behavior to be expected? If so, is there\nsomething I can do to have the output on Windows be the\nsame as on Ubuntu? I'm aware of 'git update-index --assume-unchanged'\nbut this seems harsh.\n\nI copied the repo to a non-Dropbox location, just in case\nit was Dropbox that was causing the problem, but this didn't\nmake any difference.\n\n(If you want to try this yourself, try it on the ProGit2\nbook source on Github).\n\nThanks,\nJon Forrest\n"},{"id":"287084","messageId":"c07df4ac-08c9-8eaa-0233-06616945c857@web.de","threadId":"42393","inReplyTo":"nhlqd4$ekr$1@ger.gmane.org","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-05-20T13:19:49Z","receivedAt":"2016-05-20T13:19:49Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 20.05.16 03:48, Jon Forrest wrote:\n> I'm running Git version 2.8.2 built from source on Ubuntu 16.04.\n> I'm using a repository that's stored on Dropbox. I'm the only person\n> accessing this repo. Everything works great.\n> \n> For reasons unrelated to Git, I decided to try Git for Windows,\n> so I installed \"git version 2.8.2.windows.1\" on Windows 10.\n> When I run 'git status' on Ubuntu the list I see is exactly what\n> I expect. However, when I run 'git status' on the\n> same Dropbox repo on Windows, I see what I expect plus I'm told\n> that every .pdf file and some .png files are modified.\nTo bring at least a little light into the story:\n\nWhat does \ngit diff\nsay ?\n\nWhat does \ngit config -l | grep core\nsay ?\n\nAnd what does\ngit ls-files --eol\nsay?\n"},{"id":"287086","messageId":"c20b9819-1b2d-6704-d870-1c0102dd9e35@gmail.com","threadId":"42393","inReplyTo":"c07df4ac-08c9-8eaa-0233-06616945c857@web.de","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2016-05-20T13:48:32Z","receivedAt":"2016-05-20T13:48:32Z","isPatch":false,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"\n\nOn 5/20/2016 6:19 AM, Torsten Bögershausen wrote:\n> On 20.05.16 03:48, Jon Forrest wrote:\n>> I'm running Git version 2.8.2 built from source on Ubuntu 16.04.\n>> I'm using a repository that's stored on Dropbox. I'm the only person\n>> accessing this repo. Everything works great.\n>>\n>> For reasons unrelated to Git, I decided to try Git for Windows,\n>> so I installed \"git version 2.8.2.windows.1\" on Windows 10.\n>> When I run 'git status' on Ubuntu the list I see is exactly what\n>> I expect. However, when I run 'git status' on the\n>> same Dropbox repo on Windows, I see what I expect plus I'm told\n>> that every .pdf file and some .png files are modified.\n> To bring at least a little light into the story:\n>\n> What does\n> git diff\n> say ?\n\nGreat question. For all the unexpected files it says the\nsame thing:\n\nold mode 100755\nnew mode 100644\n\n> What does\n> git config -l | grep core\n> say ?\n\ncore.symlinks=false\ncore.autocrlf=true\ncore.fscache=true\ncore.editor=vim\ncore.repositoryformatversion=0\ncore.filemode=true\ncore.bare=false\ncore.logallrefupdates=true\n>\n> And what does\n> git ls-files --eol\n> say?\n\nThe same thing for all the unexpected files,\nwhich is:\n\ni/-text w/-text attr/\n\nI'm running the above commands on Windows.\n\nThe result of the 2nd question on Ubuntu is:\n\ncore.repositoryformatversion=0\ncore.filemode=true\ncore.bare=false\ncore.logallrefupdates=true\n\nand the 3rd (for the expected files) is:\n\ni/lf    w/lf    attr/\n\nJon\n"},{"id":"287088","messageId":"ede1c113-1ab8-6043-3e39-bbacec5db31c@web.de","threadId":"42393","inReplyTo":"c20b9819-1b2d-6704-d870-1c0102dd9e35@gmail.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-05-20T14:19:25Z","receivedAt":"2016-05-20T14:19:25Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 20.05.16 15:48, Jon Forrest wrote:\n> \n> \n> On 5/20/2016 6:19 AM, Torsten Bögershausen wrote:\n>> On 20.05.16 03:48, Jon Forrest wrote:\n>>> I'm running Git version 2.8.2 built from source on Ubuntu 16.04.\n>>> I'm using a repository that's stored on Dropbox. I'm the only person\n>>> accessing this repo. Everything works great.\n>>>\n>>> For reasons unrelated to Git, I decided to try Git for Windows,\n>>> so I installed \"git version 2.8.2.windows.1\" on Windows 10.\n>>> When I run 'git status' on Ubuntu the list I see is exactly what\n>>> I expect. However, when I run 'git status' on the\n>>> same Dropbox repo on Windows, I see what I expect plus I'm told\n>>> that every .pdf file and some .png files are modified.\n>> To bring at least a little light into the story:\n>>\n>> What does\n>> git diff\n>> say ?\n> \n> Great question. For all the unexpected files it says the\n> same thing:\n> \n> old mode 100755\n> new mode 100644\n\nSo the solution is to run\ngit config  core.filemode false\n"},{"id":"287091","messageId":"ba34485d-43cc-ef35-ebc0-67b944a420a7@gmail.com","threadId":"42393","inReplyTo":"ede1c113-1ab8-6043-3e39-bbacec5db31c@web.de","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2016-05-20T14:28:41Z","receivedAt":"2016-05-20T14:28:41Z","isPatch":false,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"\n\nOn 5/20/2016 7:19 AM, Torsten Bögershausen wrote:\n\n>> Great question. For all the unexpected files it says the\n>> same thing:\n>>\n>> old mode 100755\n>> new mode 100644\n>\n> So the solution is to run\n> git config  core.filemode false\n\nThis worked perfectly!\n\nI wonder if this should be the default for Git for Windows.\n\nThanks for the quick (and correct) response.\n\nJon Forrest\n"},{"id":"287096","messageId":"xmqqy474g3cv.fsf@gitster.mtv.corp.google.com","threadId":"42393","inReplyTo":"ede1c113-1ab8-6043-3e39-bbacec5db31c@web.de","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-05-20T15:23:44Z","receivedAt":"2016-05-20T15:23:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n>>> What does\n>>> git diff\n>>> say ?\n>> \n>> Great question. For all the unexpected files it says the\n>> same thing:\n>> \n>> old mode 100755\n>> new mode 100644\n>\n> So the solution is to run\n> git config  core.filemode false\n\nThanks for asking a great question.  I somehow expected that we\nprobe in init-db.c::create_default_files() for this when we probe\nfor case sensitivity, symlinks, etc., but apparently we don't.\n\nI guess we don't because on some filesystems we can't.  IIRC, it\ngoes something like: chmod immediately followed by lstat pretends\nthat change to the executable bit stuck, until the in-core buffer at\nthe vfs layer is flushed to the disk platter that holds the\nfilesystem without any notion of executable bit.\n"},{"id":"287098","messageId":"b6ab2200-30a1-d0ce-4d4e-097838b74781@web.de","threadId":"42393","inReplyTo":"ba34485d-43cc-ef35-ebc0-67b944a420a7@gmail.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-05-20T15:57:22Z","receivedAt":"2016-05-20T15:57:22Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 20.05.16 16:28, Jon Forrest wrote:\n> \n> \n> On 5/20/2016 7:19 AM, Torsten Bögershausen wrote:\n> \n>>> Great question. For all the unexpected files it says the\n>>> same thing:\n>>>\n>>> old mode 100755\n>>> new mode 100644\n>>\n>> So the solution is to run\n>> git config  core.filemode false\n> \n> This worked perfectly!\n> \n> I wonder if this should be the default for Git for Windows.\n\nIt is.\nBut you need to clone the repo under Windows.\n\nI probably submit a patch some day, that core.filemode will be ignored\nunder Windows.\n"},{"id":"287102","messageId":"5067f10f-a12e-c6e6-493b-5ff14dae4380@web.de","threadId":"42393","inReplyTo":"xmqqy474g3cv.fsf@gitster.mtv.corp.google.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-05-20T16:12:47Z","receivedAt":"2016-05-20T16:12:47Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 20.05.16 17:23, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n> \n>>>> What does\n>>>> git diff\n>>>> say ?\n>>>\n>>> Great question. For all the unexpected files it says the\n>>> same thing:\n>>>\n>>> old mode 100755\n>>> new mode 100644\n>>\n>> So the solution is to run\n>> git config  core.filemode false\n> \n> Thanks for asking a great question.  I somehow expected that we\n> probe in init-db.c::create_default_files() for this when we probe\n> for case sensitivity, symlinks, etc., but apparently we don't.\n> \n> I guess we don't because on some filesystems we can't.  IIRC, it\n> goes something like: chmod immediately followed by lstat pretends\n> that change to the executable bit stuck, until the in-core buffer at\n> the vfs layer is flushed to the disk platter that holds the\n> filesystem without any notion of executable bit.\n\nWe do the probing, when the repo is cloned, and then never again.\nIf I clone the repo under Windows, the probing gives core.filemod false.\nIf I clone under Linux, the probing gives core.filemod true.\n\nUnfortunatly Git for Windows looks at core.filemode, when looking\nat the working tree, even if the stat() implementation never detects\nthe executable bit.\n\nA fix could look like this:\n \nstatic int git_default_core_config(const char *var, const char *value)\n{\n\t/* This needs a better name */\n\tif (!strcmp(var, \"core.filemode\")) {\n#ifndef GIT_WINDOWS_NATIVE\n\t\ttrust_executable_bit = git_config_bool(var, value);\n#endif\n\t\treturn 0;\n\t}\n"},{"id":"287104","messageId":"xmqqfutcg0pe.fsf@gitster.mtv.corp.google.com","threadId":"42393","inReplyTo":"xmqqy474g3cv.fsf@gitster.mtv.corp.google.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-05-20T16:21:01Z","receivedAt":"2016-05-20T16:21:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Thanks for asking a great question.  I somehow expected that we\n> probe in init-db.c::create_default_files() for this when we probe\n> for case sensitivity, symlinks, etc., but apparently we don't.\n\nAh, we do probe by using \"config\" as a guinea pig file.\n\nOf course, if you are doing network mount between systems with and\nwithout filemode support, the result would depend on where you did\nthe \"git init\", so that would not help.\n\nWhich means that other probed things like symlink support and case\nsensitivity are likely to be wrong in the .git/config that the user\nmay want to fix.\n"},{"id":"287239","messageId":"alpine.DEB.2.20.1605231310190.4122@virtualbox","threadId":"42393","inReplyTo":"xmqqfutcg0pe.fsf@gitster.mtv.corp.google.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-23T11:12:07Z","receivedAt":"2016-05-23T11:12:07Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 20 May 2016, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > Thanks for asking a great question.  I somehow expected that we\n> > probe in init-db.c::create_default_files() for this when we probe\n> > for case sensitivity, symlinks, etc., but apparently we don't.\n> \n> Ah, we do probe by using \"config\" as a guinea pig file.\n> \n> Of course, if you are doing network mount between systems with and\n> without filemode support, the result would depend on where you did\n> the \"git init\", so that would not help.\n> \n> Which means that other probed things like symlink support and case\n> sensitivity are likely to be wrong in the .git/config that the user\n> may want to fix.\n\nWhat we could do is to make the default config setting platform-dependent,\na la CRLF_NATIVE.\n\nI imagine that we would want this for core.filemode, core.ignorecase and\ncore.symlinks.\n\nWhat do you think?\n\nCiao,\nJohannes\n"},{"id":"287244","messageId":"6e4862b8-b5ab-ced4-29a0-bf975848e98f@gmail.com","threadId":"42393","inReplyTo":"alpine.DEB.2.20.1605231310190.4122@virtualbox","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Jon Forrest","fromEmail":"nobozo@gmail.com","sentAt":"2016-05-23T13:44:45Z","receivedAt":"2016-05-23T13:44:45Z","isPatch":false,"sender":{"key":"nobozo@gmail.com","avatar":"https://gravatar.com/avatar/37c6a7b57f29b3f35c6a9016537907c52f15bbf98575617dc046bcec6bf06372?d=mp&s=160"},"body":"\n\nOn 5/23/2016 4:12 AM, Johannes Schindelin wrote:\n\n> What we could do is to make the default config setting platform-dependent,\n> a la CRLF_NATIVE.\n>\n> I imagine that we would want this for core.filemode, core.ignorecase and\n> core.symlinks.\n>\n> What do you think?\n\nWould this change have any bad effects when the same repo is shared\nby both Windows and *nix Git users over Dropbox or a shared filesystem?\n\nJon Forrest\n"},{"id":"287252","messageId":"alpine.DEB.2.20.1605231700380.4449@virtualbox","threadId":"42393","inReplyTo":"6e4862b8-b5ab-ced4-29a0-bf975848e98f@gmail.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-23T15:08:42Z","receivedAt":"2016-05-23T15:08:42Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Jon,\n\nOn Mon, 23 May 2016, Jon Forrest wrote:\n\n> On 5/23/2016 4:12 AM, Johannes Schindelin wrote:\n> \n> > What we could do is to make the default config setting platform-dependent,\n> > a la CRLF_NATIVE.\n> >\n> > I imagine that we would want this for core.filemode, core.ignorecase and\n> > core.symlinks.\n> >\n> > What do you think?\n> \n> Would this change have any bad effects when the same repo is shared\n> by both Windows and *nix Git users over Dropbox or a shared filesystem?\n\nYes, if you have symbolic links in that repository. Likewise, if you have\nusers who find it funny to add different files whose names only differ in\ntheir case, say, xt_DSCP.c and xt_dscp.c.\n\nAlso, if your Windows users want to add scripts, they will most likely not\nmark them executable and your Linux users will call them names (forgetting\nthat they know just as little about the other platform as the developers\nthey try to ridicule).\n\nLots of fun things to keep in mind when sharing the same working directory\nbetween Operating Systems.\n\nBut you said \"when the same repo is shared\"? Do you really mean the\n*repository*? If so, there is not a problem. Only if you add a working\ndirectory into the mix.\n\nCiao,\nJohannes\n"},{"id":"287270","messageId":"xmqqeg8sa9oq.fsf@gitster.mtv.corp.google.com","threadId":"42393","inReplyTo":"alpine.DEB.2.20.1605231310190.4122@virtualbox","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-05-23T18:52:37Z","receivedAt":"2016-05-23T18:52:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> Of course, if you are doing network mount between systems with and\n>> without filemode support, the result would depend on where you did\n>> the \"git init\", so that would not help.\n>> \n>> Which means that other probed things like symlink support and case\n>> sensitivity are likely to be wrong in the .git/config that the user\n>> may want to fix.\n>\n> What we could do is to make the default config setting platform-dependent,\n> a la CRLF_NATIVE.\n>\n> I imagine that we would want this for core.filemode, core.ignorecase and\n> core.symlinks.\n>\n> What do you think?\n\nThe reason why we probe for filemode, icase, etc. at repository\ncreation time and record the result in the configuration is because\nwe do not to want to do the auto-probing at runtime, every time we\nrun any Git command.  You may be able to say \"On this platform, no\nmatter what filesystem is in use, you will always get icase and you\nwill never have executable bit\", and a build on such a platform can\nhardcode these three values.  But on other platforms these may be\nper-filesystem properties, and their binaries would not be able to\nhardcode the choices, which would mean we would record these three\nin .git/config on these platforms when a repository is created.\n\nGit built for Windows may have core.filemode=false as \"the default\nconfig setting platform-dependent, a la CRLF_NATIVE\"; how would that\ninteract with a configured core.filemode value in .git/config?\n\nIf a repository that is initialized on a non Windows system is\nnetwork mounted or rsynced and made available on Windows, its\n.git/config would record values that are suitable for the origin\nplatform (and the filesystem the repository was originally on).  On\nWindows where you can declare \"no case sensitivity, no symlink and\nno executable bits\", a solution would be to ignore these three\nconfigurable values and always use hardcoded values.  Everything\nwould work without the end user even having to know what is going\non.\n\nBut that would not be a good approach other platforms can follow to\nsolve the same issue.  A repository created on ext4 may be rsynced\ninto a case sensitive HFS+ or a case insensitive one.  MacOS X side\nneeds to have some way to tell what value for core.ignorecase to use\nbetween these two cases, as its binary cannot hardcode \"no case\nsensitivity\".\n\nSo,... I am not enthused.\n"},{"id":"287337","messageId":"5743DE28.5070000@web.de","threadId":"42393","inReplyTo":"xmqqeg8sa9oq.fsf@gitster.mtv.corp.google.com","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-05-24T04:52:56Z","receivedAt":"2016-05-24T04:52:56Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 05/23/2016 08:52 PM, Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n>>> Of course, if you are doing network mount between systems with and\n>>> without filemode support, the result would depend on where you did\n>>> the \"git init\", so that would not help.\n>>>\n>>> Which means that other probed things like symlink support and case\n>>> sensitivity are likely to be wrong in the .git/config that the user\n>>> may want to fix.\n>> What we could do is to make the default config setting platform-dependent,\n>> a la CRLF_NATIVE.\n>>\n>> I imagine that we would want this for core.filemode, core.ignorecase and\n>> core.symlinks.\n>>\n>> What do you think?\n> The reason why we probe for filemode, icase, etc. at repository\n> creation time and record the result in the configuration is because\n> we do not to want to do the auto-probing at runtime, every time we\n> run any Git command.  You may be able to say \"On this platform, no\n> matter what filesystem is in use, you will always get icase and you\n> will never have executable bit\", and a build on such a platform can\n> hardcode these three values.  But on other platforms these may be\n> per-filesystem properties, and their binaries would not be able to\n> hardcode the choices, which would mean we would record these three\n> in .git/config on these platforms when a repository is created.\n>\n> Git built for Windows may have core.filemode=false as \"the default\n> config setting platform-dependent, a la CRLF_NATIVE\"; how would that\n> interact with a configured core.filemode value in .git/config?\nif core.filemode is true, Git for Windows could:\na) Behave as today, report changed files (filemode)\nb) Give warning to the user (and report changed filemode)\nc) Error out, saying misconfigured worktree\nd) use core.filemode = false anyway.\ne) Give a warning and use core.filemode = false anyway.\n\nAt the moment I tend for c), as it makes it clear what is going wrong,\nwhat do you think ?\n\n[skip ignorecase for a second]\n"},{"id":"287411","messageId":"alpine.DEB.2.20.1605241352361.4449@virtualbox","threadId":"42393","inReplyTo":"5743DE28.5070000@web.de","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-24T11:57:31Z","receivedAt":"2016-05-24T11:57:31Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 24 May 2016, Torsten Bögershausen wrote:\n\n> On 05/23/2016 08:52 PM, Junio C Hamano wrote:\n> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> >\n> > > > Of course, if you are doing network mount between systems with and\n> > > > without filemode support, the result would depend on where you did\n> > > > the \"git init\", so that would not help.\n> > > >\n> > > > Which means that other probed things like symlink support and case\n> > > > sensitivity are likely to be wrong in the .git/config that the\n> > > > user may want to fix.\n> > >\n> > > What we could do is to make the default config setting\n> > > platform-dependent, a la CRLF_NATIVE.\n> > >\n> > > I imagine that we would want this for core.filemode, core.ignorecase and\n> > > core.symlinks.\n> > >\n> > > What do you think?\n> >\n> > The reason why we probe for filemode, icase, etc. at repository\n> > creation time and record the result in the configuration is because we\n> > do not to want to do the auto-probing at runtime, every time we run\n> > any Git command.\n\nRight, I missed this of course. My idea was to have saner defaults *iff\nthe config variables are not set explicitly*. But they *are* set, of\ncourse. Just not in a way that makes sense when the very same working\ndirectory is accessed from different Operating Systems.\n\n> if core.filemode is true, Git for Windows could:\n> a) Behave as today, report changed files (filemode)\n> b) Give warning to the user (and report changed filemode)\n> c) Error out, saying misconfigured worktree\n> d) use core.filemode = false anyway.\n> e) Give a warning and use core.filemode = false anyway.\n> \n> At the moment I tend for c), as it makes it clear what is going wrong,\n> what do you think ?\n\nThe problem with that is that we would need to probe again. Or dictate for\nall eternity that Git for Windows cannot determine the executable bit (but\nwho knows for certain?)\n\nI am pretty convinced that we should go with a)\n\nCiao,\nDscho"},{"id":"287476","messageId":"57452BB9.5090500@web.de","threadId":"42393","inReplyTo":"alpine.DEB.2.20.1605241352361.4449@virtualbox","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-05-25T04:36:09Z","receivedAt":"2016-05-25T04:36:09Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 05/24/2016 01:57 PM, Johannes Schindelin wrote:\n> Hi,\n>\n> On Tue, 24 May 2016, Torsten Bögershausen wrote:\n>\n>> On 05/23/2016 08:52 PM, Junio C Hamano wrote:\n>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>>\n>>>>> Of course, if you are doing network mount between systems with and\n>>>>> without filemode support, the result would depend on where you did\n>>>>> the \"git init\", so that would not help.\n>>>>>\n>>>>> Which means that other probed things like symlink support and case\n>>>>> sensitivity are likely to be wrong in the .git/config that the\n>>>>> user may want to fix.\n>>>> What we could do is to make the default config setting\n>>>> platform-dependent, a la CRLF_NATIVE.\n>>>>\n>>>> I imagine that we would want this for core.filemode, core.ignorecase and\n>>>> core.symlinks.\n>>>>\n>>>> What do you think?\n>>> The reason why we probe for filemode, icase, etc. at repository\n>>> creation time and record the result in the configuration is because we\n>>> do not to want to do the auto-probing at runtime, every time we run\n>>> any Git command.\n> Right, I missed this of course. My idea was to have saner defaults *iff\n> the config variables are not set explicitly*. But they *are* set, of\n> course. Just not in a way that makes sense when the very same working\n> directory is accessed from different Operating Systems.\n>\n>> if core.filemode is true, Git for Windows could:\n>> a) Behave as today, report changed files (filemode)\n>> b) Give warning to the user (and report changed filemode)\n>> c) Error out, saying misconfigured worktree\n>> d) use core.filemode = false anyway.\n>> e) Give a warning and use core.filemode = false anyway.\n>>\n>> At the moment I tend for c), as it makes it clear what is going wrong,\n>> what do you think ?\n> The problem with that is that we would need to probe again.\nThe probing for the filemode:\nWouldn't it be enough to run lstat() on .git/ ?\nIf the user-execuatable bit is not set, but core.filemode is true, error \nout ?\nThat would not cost too much.\n>   Or dictate for\n> all eternity that Git for Windows cannot determine the executable bit (but\n> who knows for certain?)\nCan we can limit the eternity until the day when Windows can determine \nthe executable\nbit ?\n"},{"id":"287492","messageId":"alpine.DEB.2.20.1605251349210.4449@virtualbox","threadId":"42393","inReplyTo":"57452BB9.5090500@web.de","subject":"Re: Odd Difference Between Windows Git and Standard Git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-25T11:52:38Z","receivedAt":"2016-05-25T11:52:38Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Torsten,\n\nOn Wed, 25 May 2016, Torsten Bögershausen wrote:\n\n> On 05/24/2016 01:57 PM, Johannes Schindelin wrote:\n> >\n> > On Tue, 24 May 2016, Torsten Bögershausen wrote:\n> >\n> > > if core.filemode is true, Git for Windows could:\n> > > a) Behave as today, report changed files (filemode)\n> > > b) Give warning to the user (and report changed filemode)\n> > > c) Error out, saying misconfigured worktree\n> > > d) use core.filemode = false anyway.\n> > > e) Give a warning and use core.filemode = false anyway.\n> > >\n> > > At the moment I tend for c), as it makes it clear what is going wrong,\n> > > what do you think ?\n> >\n> > The problem with that is that we would need to probe again.\n>\n> The probing for the filemode:\n> Wouldn't it be enough to run lstat() on .git/ ?\n\nWhat about `git diff --no-index`? There is no `.git/` to probe there.\n\n> If the user-execuatable bit is not set, but core.filemode is true, error\n> out ?  That would not cost too much.\n\nI think it would cost us a nice and clean logic ;-)\n\n> > Or dictate for all eternity that Git for Windows cannot determine the\n> > executable bit (but who knows for certain?)\n>\n> Can we can limit the eternity until the day when Windows can determine\n> the executable bit ?\n\nThe point is: I will have forgotten by next week what we talked about\n(there are way too many things going on in my life), and if and when\ncompat/mingw.c will be taught to infer the executable bit, I am prone to\nforget that warning (if we introduce it).\n\nTherefore, out of entirely practical considerations, I favor the status\nquo.\n\nCiao,\nDscho"}]}