Re: git merge changes file mode from 644 to 755
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Aug 14, 2015, 14:17 UTC
- Message-ID
- <55CDF891.4080709@kdbg.org>
- In-Reply-To
- <CA+POfmsohJAGVYHM3nHJydoyxe92QFd59eWT_UG+_0fM46SATA@mail.gmail.com>
Am 14.08.2015 um 14:02 schrieb Dmitry Oksenchuk:
Show 9 quoted lines
> Hello, > > I've noticed strange behavior of git merge on Windows with > core.filemode=false (set by default). Git changed mode of some files > from 644 to 755 for unknown reason. One of the files is stdafx.cpp, > it's absent in the common ancestor, it was added in the first branch > (master) with mode 644 and it's still absent in the second branch > (feature). So, git merges the file without conflicts but changes mode > from 644 to 755.
I do know the git-merge-recursive does not honor core.filemode. However, I am surprised to see a mode change from 644 to 755. I usually observe only mode changes from 755 to 644, but then the case where the file is not present on one branch is uncommon for me.
> Why git merge changes mode from 644 to 755? Is it a known issue?
So, well, yes, it is known that with git merge mode changes do occur, but no, 644 to 755 is news to me.
The work-around is to unstage the file and stage it again, e.g. with git-gui and then to amend the merge commit.
-- Hannes