author | Junio C Hamano <junkio@cox.net> | |
Sat, 5 Aug 2006 11:16:02 +0000 (04:16 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 7 Aug 2006 08:58:53 +0000 (01:58 -0700) | ||
commit | b7e58b17b50bbbf00299fc89c480efd7cc92c1bd | |
tree | 7d1393116091e3a46c8c44efd02dda2244995841 | tree | snapshot |
parent | f25b79397c9775df9eeef3d59d0cc3b1f913bc60 | commit | diff |
Racy git: avoid having to be always too careful
Immediately after a bulk checkout, most of the paths in the
working tree would have the same timestamp as the index file,
and this would force ce_match_stat() to take slow path for all
of them. When writing an index file out, if many of the paths
have very new (read: the same timestamp as the index file being
written out) timestamp, we are better off delaying the return
from the command, to make sure that later command to touch the
working tree files will leave newer timestamps than recorded in
the index, thereby avoiding to take the slow path.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Immediately after a bulk checkout, most of the paths in the
working tree would have the same timestamp as the index file,
and this would force ce_match_stat() to take slow path for all
of them. When writing an index file out, if many of the paths
have very new (read: the same timestamp as the index file being
written out) timestamp, we are better off delaying the return
from the command, to make sure that later command to touch the
working tree files will leave newer timestamps than recorded in
the index, thereby avoiding to take the slow path.
Signed-off-by: Junio C Hamano <junkio@cox.net>
read-cache.c | diff | blob | history |