diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index ef2e78f9df951cfacf5914dfff2a218d2e6f89f7..8fb3a56838dd476b9b0923f835ce70bd95499f2b 100755 (executable)
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
git mv -k untracked1 untracked2 path0 &&
test -f untracked1 &&
test -f untracked2 &&
git mv -k untracked1 untracked2 path0 &&
test -f untracked1 &&
test -f untracked2 &&
- test ! -f path0/untracked1
+ test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
test ! -f path0/untracked2'
+test_expect_success \
+ '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 \
# clean up the mess in case bad things happen
rm -f idontexist untracked1 untracked2 \
path0/idontexist path0/untracked1 path0/untracked2 \