Re: 'git status' is not read-only fs friendly

From: Junio C Hamano <junkio@cox.net>
Date: 2007-02-10 07:27:55
"Marco Costalba" <mcostalba@gmail.com> writes:

> Sorry, perhaps it is a silly question, but why git index should be
> different after just touching a file?

It uses the information from lstat(2) that is stored in the
index and taken from the filesystem -- if they are different
(touch changes it as you know, but so does "vi that-file") they
are reported as "modified".

	git checkout -- Makefile
        git diff-files Makefile
	touch Makefile
	git diff-files Makefile

The 'refresh' operation is to update the lstat(2) information in
the index for paths whose contents actually match what is in the
index (and it does not do anything else -- most notably paths
whose contents are different between the working tree and the
index are left as-is).

-
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
Received on Sat Feb 10 07:31:54 2007

This archive was generated by hypermail 2.1.8 : 2007-02-10 07:33:41 EST