From: Jonathan Nieder Date: Fri, 30 Jul 2010 18:31:22 +0000 (-0500) Subject: t4111 (apply): refresh index before applying patches to it X-Git-Tag: v1.7.3-rc0~34^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/60f20d4bb4f56ae90967d810ffb042e9f76b310d?ds=inline;hp=60f20d4bb4f56ae90967d810ffb042e9f76b310d t4111 (apply): refresh index before applying patches to it "git apply", like most plumbing, does not automatically refresh the index file even if it is only stat-dirty. So unless the two "cp" commands in reset_preimage() for a given file happen to have the same time stamp, there will be a spurious error: sub/dir/file: does not match index Refresh the index to eliminate this timing dependency. Noticed by running the test with --valgrind (which slows things down a lot). Reported-by: Thomas Rast Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano ---