summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2009-02-04 09:32:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-04 19:07:42 (GMT)
commit5aed3c6ab834367292bd7a9b0894177a07afd910 (patch)
tree4be58af9c9128aa8f1ff36e07f55857559c1456b /t/t7001-mv.sh
parentc8ba6b1b199bf00f227e8fdad4adb5a2147c8160 (diff)
downloadgit-5aed3c6ab834367292bd7a9b0894177a07afd910.zip
git-5aed3c6ab834367292bd7a9b0894177a07afd910.tar.gz
git-5aed3c6ab834367292bd7a9b0894177a07afd910.tar.bz2
builtin-mv.c: check for unversionned files before looking at the destination.
The previous code was failing in the case where one moves an unversionned file to an existing destination, with mv -f: the "existing destination" was checked first, and the error was cancelled by the force flag. We now check the unrecoverable error first, which fixes the bug. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index ef7e56e..d2ec550 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -58,7 +58,7 @@ test_expect_success \
test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
-test_expect_failure \
+test_expect_success \
'checking -f on untracked file with existing target' \
'touch path0/untracked1 &&
git mv -f untracked1 path0