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

Re: ignoring file modes completely

From
RKRafael Kitover <rkitover@io.com>
Date
Feb 6, 2011, 16:14 UTC
Message-ID
<4D4EC8E6.2090200@io.com>
In-Reply-To
<4D4EC3FD.5010000@io.com>
On 2/6/2011 10:53 AM, Rafael Kitover wrote:
Show 52 quoted lines
> On 2/6/2011 8:14 AM, Michael J Gruber wrote:
>> Rafael Kitover venit, vidit, dixit 05.02.2011 20:28:
>>> On 2/5/2011 11:58 AM, Andreas Ericsson wrote:
>>>> On 02/05/2011 05:09 PM, Rafael Kitover wrote:
>>>>> On 2/5/2011 11:03 AM, Jared Hance wrote:
>>>>>> On Sat, 2011-02-05 at 10:24 -0500, Rafael Kitover wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I found the core.filemode option, which ignores executable bits,
>>>>>>> but I
>>>>>>> need an option to ignore all mode differences, and such an option
>>>>>>> does
>>>>>>> not seem to exist.
>>>>>>
>>>>>> The only mode tracked by Git is the executable bit, so this shouldn't
>>>>>> even be an issue. Are you sure the executable bit isn't the problem?
>>>>>>
>>>>> $ git config --global core.filemode
>>>>> false
>>>>>
>>>>> Output of "git diff HEAD" :
>>>>>
>>>>> diff --git a/Makefile.PL b/Makefile.PL
>>>>> old mode 100755
>>>>> new mode 100644
>>>>> diff --git a/t/02ads.t b/t/02ads.t
>>>>> old mode 100755
>>>>> new mode 100644
>>>>> diff --git a/t/02cxn.t b/t/02cxn.t
>>>>> old mode 100755
>>>>> new mode 100644
>>>>> diff --git a/t/04os.t b/t/04os.t
>>>>> old mode 100755
>>>>> new mode 100644
>>>>
>>>> Those are all executable bit diffs.
>>>>
>>>
>>> Ok, but I have core.filemode set to "false" as I showed, why does this
>>> happen then?
>>
>> I can't confirm this on linux with current git. What are your versions?
>> Do you have a minimal example (starting from git init)?
>
> This is msysGit:
>
> $ git --version
> git version 1.7.3.1
>
> I can't replicate this with just "git init" and a file, it seems to
> happen when I use "git cpan-init" in Cygwin then look at the repo in
> msysGit.
Actually, I can replicate this in Cygwin git:

$ git --version git version 1.7.3.3

$ cd ~/src $ mkdir test-repo $ cd test-repo $ git init $ touch README $ git add README $ git commit -a -m'test commit' $ git diff HEAD $ chmod +x README $ git diff HEAD

diff --git a/README b/README
old mode 100644
new mode 100755
$ git config --global core.filemode
false

The way the executable bit works seems to be different between Cygwin 
and msys, but in either case core.filemode seems to not be working properly.
Previous: Rafael KitoverNext: Dmitry Potapov
Message 8 of 10 in “ignoring file modes completely”
  1. Rafael KitoverFeb 5, 2011
  2. Jared HanceFeb 5, 2011
  3. Rafael KitoverFeb 5, 2011
  4. Andreas EricssonFeb 5, 2011
  5. Rafael KitoverFeb 5, 2011
  6. Michael J GruberFeb 6, 2011
  7. Rafael KitoverFeb 6, 2011
  8. Rafael KitoverFeb 6, 2011
  9. Dmitry PotapovFeb 6, 2011
  10. Rafael KitoverFeb 6, 2011

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.