threads / discuss / 22383

git status showing phantom modifications

Subject: git status showing phantom modifications

## tl;dr

7 messages between Jan 25, 2010 and Jan 28, 2010.

replies: 6people: 3as markdown or json

Michael Ludwig· Jan 25, 2010, 10:41 UTC · lore
This is on Cygwin, package git-1.6.4.2-1 [1]:

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

Note: This repository is a fresh conversion from a subversion repository.
As mentioned, this is Cygwin on XP Home, and the filesystem is NTFS.
michael@wladimir:/cygdrive/m/REPOS6.TECH.git :-) cd comp
Note: The directory I've cd'd into is not a submodule, just a regular part
of the working copy.

michael@wladimir:/cygdrive/m/REPOS6.TECH.git/comp :-) git st # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: mw/wsdl-version.txt # modified: net/httpsrvr/iis6.wodo # ... and about 100 more of that ...

I would expect the output of git status to be consistent regardless of my position in the working directory.

Git bug, Cygwin issue, or some oversight of mine?
[1] http://cygwin.com/packages/git/
-- 
Michael.Ludwig (#) XING.com
Tay Ray Chuan· Jan 25, 2010, 11:03 UTC · re: Michael Ludwig · lore

Re: git status showing phantom modifications

Hi,
On Mon, Jan 25, 2010 at 6:41 PM, Michael Ludwig <michael.ludwig@xing.com> wrote:
Show 9 quoted lines
> michael@wladimir:/cygdrive/m/REPOS6.TECH.git/comp :-) git st
> # On branch master
> # Changed but not updated:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working directory)
> #
> #       modified:   mw/wsdl-version.txt
> #       modified:   net/httpsrvr/iis6.wodo
> #       ... and about 100 more of that ...

try running git diff. I suspect the changes are to filemodes. What does your git config look like regarding this (particularly core.fileMode)?

-- 
Cheers,
Ray Chuan
Michael Ludwig· Jan 25, 2010, 11:43 UTC · re: Tay Ray Chuan · lore

Re: git status showing phantom modifications

Am 25.01.2010 um 12:03 schrieb Tay Ray Chuan:
Show 14 quoted lines
> On Mon, Jan 25, 2010 at 6:41 PM, Michael Ludwig <michael.ludwig@xing.com> wrote:
>> michael@wladimir:/cygdrive/m/REPOS6.TECH.git/comp :-) git st
>> # On branch master
>> # Changed but not updated:
>> #   (use "git add <file>..." to update what will be committed)
>> #   (use "git checkout -- <file>..." to discard changes in working directory)
>> #
>> #       modified:   mw/wsdl-version.txt
>> #       modified:   net/httpsrvr/iis6.wodo
>> #       ... and about 100 more of that ...
> 
> try running git diff. I suspect the changes are to filemodes. What
> does your git config look like regarding this (particularly
> core.fileMode)?

Running git diff informed me there were no changes to content, which is what I forgot to add to the description of the problem.

Unfortunately, right now I'm not at the system where this occurred, so I can't say what git config looks like. I did not, however, make any customization other than user.email and alias.st and some others.

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.

Google also found me an old patch that might be related to the problem:

[PATCH] Force core.filemode to false on Cygwin. http://marc.info/?l=git&m=116754085018507&w=2

-- 
Michael.Ludwig (#) XING.com
Michael Ludwig· Jan 26, 2010, 09:14 UTC · re: Michael Ludwig · lore

Re: git status showing phantom modifications

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
Tay Ray Chuan· Jan 27, 2010, 05:14 UTC · re: Michael Ludwig · lore

Re: git status showing phantom modifications

Hi Johannes,
do you happen to have any clue on this?
-- 
Cheers,
Ray Chuan


On Tue, Jan 26, 2010 at 5:14 PM, Michael Ludwig <michael.ludwig@xing.com> wrote:
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Johannes Sixt· Jan 27, 2010, 07:20 UTC · re: Tay Ray Chuan · lore

Re: git status showing phantom modifications

Please do not top-post, particularly not when you place the meat of the message after a "-- " marker; There's *no way* to force Thunderbird to include the text below it in the reply.

Tay Ray Chuan schrieb:
> do you happen to have any clue on this?
Sorry, no. One more thing to try is:
  core.ignorecygwinfstricks = false
This turns off some stat() optimizations on Cygwin.
-- Hannes
Michael Ludwig· Jan 28, 2010, 08:45 UTC · re: Johannes Sixt · lore

Re: git status showing phantom modifications

Am 27.01.2010 um 08:20 schrieb Johannes Sixt:
Show 5 quoted lines
> One more thing to try is:
> 
>  core.ignorecygwinfstricks = false
> 
> This turns off some stat() optimizations on Cygwin.

The above setting causes the phantom modifications to disappear, regardless of an *explicit* setting of core.filemode as reported in one of my previous mails on this thread.

So thanks, it works okay for me. Still, it's not clear what's happening.

-- 
Michael.Ludwig (#) XING.com

← back to recent threads