Re: [PATCHv2] git-mv: Keep moved index entries inact
Hi,
On Mon, 28 Jul 2008, SZEDER Gábor wrote:
Show 9 quoted lines
> there is a race somewhere in these 'git-mv: Keep moved index entries
> inact' changes.
>
> The test cases 'git mv should overwrite symlink to a file' or 'git mv
> should overwrite file with a symlink' fail occasionaly. It's quite
> non-deterministic: I have run t7001-mv.sh in a loop (see below) and
> one or the other usually fails around 50 runs (but sometimes only
> after 150). Adding some tracing echos to the tests shows that both
> tests fail when running 'git diff-files' at the end.
To make it more convenient to test: with this patch it fails all the time:
-- snipsnap --
t/t7001-mv.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index b0fa407..6699abd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -180,6 +180,7 @@ test_expect_success 'git mv should overwrite symlink to a file' '
echo 1 >moved &&
ln -s moved symlink &&
git add moved symlink &&
+ sleep 1 &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
! test -e moved &&