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

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
Previous: Dmitry Oksenchuk
Message 2 of 2 in “git merge changes file mode from 644 to 755”
  1. Dmitry OksenchukAug 14, 2015
  2. Johannes SixtAug 14, 2015

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.