aboutsummaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2009-02-04 10:32:07 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-04 11:04:56 -0800
commitc8ba6b1b199bf00f227e8fdad4adb5a2147c8160 (patch)
tree2615dd6bb79ce82ba35c7f8aeef83388c62c1f3f /t/t7001-mv.sh
parent720ec6b870ba913affd0f6c01d5a61b9b2c5aadb (diff)
downloadgit-c8ba6b1b199bf00f227e8fdad4adb5a2147c8160.tar.gz
git-c8ba6b1b199bf00f227e8fdad4adb5a2147c8160.tar.xz
Add a testcase for "git mv -f" on untracked files.
This currently fails with: git: builtin-mv.c:217: cmd_mv: Assertion `pos >= 0' failed. 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.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 539effe69..ef7e56ed6 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -58,6 +58,14 @@ test_expect_success \
test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
+test_expect_failure \
+ 'checking -f on untracked file with existing target' \
+ 'touch path0/untracked1 &&
+ git mv -f untracked1 path0
+ test ! -f .git/index.lock &&
+ test -f untracked1 &&
+ test -f path0/untracked1'
+
# clean up the mess in case bad things happen
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \