From: Junio C Hamano Date: Fri, 09 Feb 2007 20:27:55 GMT Subject: Re: 'git status' is not read-only fs friendly Message-ID: <7vk5yrt6t0.fsf@assigned-by-dhcp.cox.net> In-Reply-To: "Marco Costalba" 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).