"Marco Costalba" <mcostalba@xxxxxxxxx> 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html