Code

Racy git: avoid having to be always too careful
authorJunio C Hamano <junkio@cox.net>
Sat, 5 Aug 2006 11:16:02 +0000 (04:16 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 7 Aug 2006 08:58:53 +0000 (01:58 -0700)
commitb7e58b17b50bbbf00299fc89c480efd7cc92c1bd
tree7d1393116091e3a46c8c44efd02dda2244995841
parentf25b79397c9775df9eeef3d59d0cc3b1f913bc60
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>
read-cache.c