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>
Matthieu Moy committed
Feb 4, 2009 at 10:32 UTC
c8ba6b1b199bf00f227e8fdad4adb5a2147c8160
1 file changed
+8
t/t7001-mv.sh
+8
@@ -58,6 +58,14 @@ test_expect_success \
58
test ! -f path0/untracked1 &&
59
test ! -f path0/untracked2'
60
61
+test_expect_failure \
62
+ 'checking -f on untracked file with existing target' \
63
+ 'touch path0/untracked1 &&
64
+ git mv -f untracked1 path0
65
+ test ! -f .git/index.lock &&
66
+ test -f untracked1 &&
67
+ test -f path0/untracked1'
68
+
69
# clean up the mess in case bad things happen
70
rm -f idontexist untracked1 untracked2 \
71
path0/idontexist path0/untracked1 path0/untracked2 \