author | Junio C Hamano <junkio@cox.net> | |
Mon, 19 Sep 2005 21:49:50 +0000 (14:49 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Sep 2005 22:07:53 +0000 (15:07 -0700) | ||
commit | 1991b223c05d45d2a915842990b2a7c4819dcbcf | |
tree | 341f43cab4c91c279e8adb995ac77c61fadf7f98 | tree | snapshot |
parent | e9bacb4f6a6f0aae7270acb257977f9ee0bbd6db | commit | diff |
Fast-path 'update-index --refresh' a bit.
If the length in the stat information does not match what is recorded
in the index, there is no point rehashing the contents to see if the
index entry can be refreshed.
We need to be a bit careful. Immediately after read-tree or
checkout-index without -u, ce_size is set to zero and does not match
the length of the blob that is recorded, and we need to actually look
at the contents to see if it has been changed.
Signed-off-by: Junio C Hamano <junkio@cox.net>
If the length in the stat information does not match what is recorded
in the index, there is no point rehashing the contents to see if the
index entry can be refreshed.
We need to be a bit careful. Immediately after read-tree or
checkout-index without -u, ce_size is set to zero and does not match
the length of the blob that is recorded, and we need to actually look
at the contents to see if it has been changed.
Signed-off-by: Junio C Hamano <junkio@cox.net>
update-index.c | diff | blob | history |