Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:53

"Marco Costalba" [off-list ref] 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).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help