[issue3109] Git subrepos may be reported as dirty when they are actually clean
Tim Henigan
bugs at mercurial.selenic.com
Thu Nov 17 15:18:57 CST 2011
New submission from Tim Henigan <tim.henigan at gmail.com>:
As noted here:
http://git.661346.n2.nabble.com/False-positives-in-git-diff-index-
tp5869013p5891295.html
and here:
http://stackoverflow.com/questions/8170240/mercurial-internals-git-
subrepository-status-after-aggressive-permission-chang
In some corner cases, Git subrepos may be reported as dirty when they are
actually clean.
This can happen if a user runs a command which changes file stat info in the
Git subrepo. "git status" will show that the repo is clean, but "git diff-
index -q HEAD" will show that the repo is dirty because of the file stat
changes.
subrepos.py::gitsubrepo uses "git diff-index -q HEAD" to determine if the
Git working copy is clean.
One potential fix would be to run "git update-index --refresh" prior to "git
diff-index".
----------
messages: 18102
nosy: thenigan
priority: bug
status: unread
title: Git subrepos may be reported as dirty when they are actually clean
topic: subrepo
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3109>
____________________________________________________
More information about the Mercurial-devel
mailing list