author | Junio C Hamano <junkio@cox.net> | |
Thu, 9 Feb 2006 05:49:47 +0000 (21:49 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 9 Feb 2006 05:54:48 +0000 (21:54 -0800) | ||
commit | 8b9b0f3af73233595b6b1103ffb30242508a5e47 | |
tree | 9b4ac8167e9f300f051d14e6ee2b7ba0375d3462 | tree | snapshot |
parent | 5f73076c1a9b4b8dc94f77eac98eb558d25e33c0 | commit | diff |
"Assume unchanged" git: do not set CE_VALID with --refresh
When working with automatic assume-unchanged mode using
core.ignorestat, setting CE_VALID after --refresh makes things
more cumbersome to use. Consider this scenario:
(1) the working tree is on a filesystem with slow lstat(2).
The user sets core.ignorestat = true.
(2) "git checkout" to switch to a different branch (or initial
checkout) updates all paths and the index starts out with
"all clean".
(3) The user knows she wants to edit certain paths. She uses
update-index --no-assume-unchanged (we could call it --edit;
the name is inmaterial) to mark these paths and starts
editing.
(4) After editing half of the paths marked to be edited, she
runs "git status". This runs "update-index --refresh" to
reduce the false hits from diff-files.
(5) Now the other half of the paths, since she has not changed
them, are found to match the index, and CE_VALID is set on
them again.
For this reason, this commit makes update-index --refresh not to
set CE_VALID even after the path without CE_VALID are verified
to be up to date. The user still can run --really-refresh to
force lstat() to match the index entries to the reality.
Signed-off-by: Junio C Hamano <junkio@cox.net>
When working with automatic assume-unchanged mode using
core.ignorestat, setting CE_VALID after --refresh makes things
more cumbersome to use. Consider this scenario:
(1) the working tree is on a filesystem with slow lstat(2).
The user sets core.ignorestat = true.
(2) "git checkout" to switch to a different branch (or initial
checkout) updates all paths and the index starts out with
"all clean".
(3) The user knows she wants to edit certain paths. She uses
update-index --no-assume-unchanged (we could call it --edit;
the name is inmaterial) to mark these paths and starts
editing.
(4) After editing half of the paths marked to be edited, she
runs "git status". This runs "update-index --refresh" to
reduce the false hits from diff-files.
(5) Now the other half of the paths, since she has not changed
them, are found to match the index, and CE_VALID is set on
them again.
For this reason, this commit makes update-index --refresh not to
set CE_VALID even after the path without CE_VALID are verified
to be up to date. The user still can run --really-refresh to
force lstat() to match the index entries to the reality.
Signed-off-by: Junio C Hamano <junkio@cox.net>
update-index.c | diff | blob | history |