git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-update-index loses executable bit for unmerged files when core.filemode is false
@ 2010-10-22 17:28 Stefan Haller
  2010-10-24 11:40 ` [PATCH] Add tests to demonstrate update-index bug with core.symlinks/core.filemode Stefan Haller
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Haller @ 2010-10-22 17:28 UTC (permalink / raw)
  To: git

There's a bug with the handling of the executable bit when core.filemode
is false: when you have an executable file that has unmerged changes,
and you stage it with "git update-index", the executable bit is lost.
If you stage it with "git add" instead, it works fine.

    git init test
    cd test
    git config core.filemode false
    touch foo
    git add foo
    git update-index --chmod=+x foo
    git commit -m "Initial revision"
    git branch br
    echo bla >foo
    git commit -a -m "Changed foo"
    git checkout br
    echo blubb >foo
    git commit -a -m "Changed foo"
    git merge master
    git update-index foo
    git diff --staged

See how the diff shows that the mode goes from 100755 to 100644.  If you
replace the second-to-last line with "git add foo", it doesn't.

I started to trace this down, but I didn't get very far, as I'm not
familiar enough with the git codebase yet; so any help would be
appreciated.


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-25  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 17:28 git-update-index loses executable bit for unmerged files when core.filemode is false Stefan Haller
2010-10-24 11:40 ` [PATCH] Add tests to demonstrate update-index bug with core.symlinks/core.filemode Stefan Haller
2010-10-24 18:53   ` Stefan Haller
2010-10-25  7:34     ` Junio C Hamano
2010-10-24 23:41   ` Jakub Narebski
2010-10-25  8:59     ` Stefan Haller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).