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

Re: git status showing phantom modifications

From
MLMichael Ludwig <michael.ludwig@xing.com>
Date
Jan 26, 2010, 09:14 UTC
Message-ID
<59B5C4C4-6E95-4BAA-9351-B88B6309E022@xing.com>
In-Reply-To
<4017EB11-4B29-4599-B19A-91BC39632BBF@xing.com>
Am 25.01.2010 um 12:43 schrieb Michael Ludwig:
> Reading up about core.fileMode in git-config(1), I think you've pointed
> me to the solution. I should probably just set it to false. If that doesn't
> solve the issue, I'll report back.
Back with more info:
git version 1.6.4.2
Before adding any core.filemode setting to ~/.gitconfig or .git/config:

michael@wladimir:/cygdrive/m/REPOS6.TECH.git/comp :-) git config -l user.name=Michael Ludwig user.email=... core.repositoryformatversion=0 core.filemode=true <= filemode already present core.bare=false core.logallrefupdates=true core.ignorecase=true core.autocrlf=false svn-remote.svn.ignore-paths=^(some|paths) svn-remote.svn.url=svn://localhost svn-remote.svn.fetch=:refs/remotes/git-svn svn.authorsfile=authors.txt

My git status output after cd to subdir shows many files "modified". But they aren't! Edited ~/.gitconfig to include core.filemode = true [sic]. Here's the diff for the git config output:

--- /home/michael/a 2010-01-25 20:36:53.140625000 +0100 +++ /home/michael/b 2010-01-25 20:37:01.421875000 +0100

@@ -4,6 +4,7 @@
alias.ci=checkin
alias.co=checkout
alias.br=branch
+core.filemode=true
core.repositoryformatversion=0
core.filemode=true
core.bare=false

We're seeing core.filemode appear *twice*. Why that?

michael@wladimir:/cygdrive/m/REPOS6.TECH.git/comp :-) git st
# On branch master
nothing to commit (working directory clean)

So it seems adding core.filemode = true has fixed the issue, or at least
covered the symptoms. Adding core.filemode = false did not cause the
phantom modifications to disappear. Note that from reading git-config(1),
I had rather assumed this latter setting to have the desired effect.

And something seems to be wrong here. Why are modifications flagged when
doing git status from a subdir but not from the topdir?
-- 
Michael.Ludwig (#) XING.com
Previous: Michael LudwigNext: Tay Ray Chuan
Message 4 of 7 in “git status showing phantom modifications”
  1. Michael LudwigJan 25, 2010
  2. Tay Ray ChuanJan 25, 2010
  3. Michael LudwigJan 25, 2010
  4. Michael LudwigJan 26, 2010
  5. Tay Ray ChuanJan 27, 2010
  6. Johannes SixtJan 27, 2010
  7. Michael LudwigJan 28, 2010

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.