Re: What does "modified" in git status mean?
- From
- Seth Robertson <in-gitvger@baka.org>
- Date
- Jan 22, 2012, 17:56 UTC
- Message-ID
- <201201221756.q0MHuWmL003864@no.baka.org>
- In-Reply-To
- <loom.20120122T174204-274@post.gmane.org>
In message <loom.20120122T174204-274@post.gmane.org>, Mikolas writes:
1) Is there some way how to tell status to tell me *why* the files
are marked as modified?Not as such. However, I do have a script which, when run from the root of the working directory, manually compares the on-disk files to what is checked into git. This would detect any whitespace or smudge related changes, or of course any normal user changes.
git ls-tree --name-only -r HEAD | while read path; do if [ ! -f "$path" ]; then continue; fi; sha1=`git show "HEAD:$path" | sha1sum | awk '{print $1;}'`; sha2=`sha1sum "$path" | awk '{print $1;}'`; if [ $sha1 != $sha2 ]; then echo "<$sha1> <$sha2> $path"; fi; done2) Is it normal that git status behaves differently in different directories?
I would say not, but perhaps you have a .gitattributes in that directory? (Which would be a bug) Could you try with a more recent version of git?
-Seth Robertson