diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 539effe694684dde01da1a93421a28b549b9527a..8fb3a56838dd476b9b0923f835ce70bd95499f2b 100755 (executable)
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
test_expect_success \
'prepare reference tree' \
'mkdir path0 path1 &&
test_expect_success \
'prepare reference tree' \
'mkdir path0 path1 &&
- cp ../../COPYING path0/COPYING &&
+ cp "$TEST_DIRECTORY"/../COPYING path0/COPYING &&
git add path0/COPYING &&
git commit -m add -a'
git add path0/COPYING &&
git commit -m add -a'
test ! -f path0/untracked1 &&
test ! -f path0/untracked2'
test ! -f path0/untracked1 &&
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 \
test_expect_success \
'adding another file' \
test_expect_success \
'adding another file' \
- 'cp ../../README path0/README &&
+ 'cp "$TEST_DIRECTORY"/../README path0/README &&
git add path0/README &&
git commit -m add2 -a'
git add path0/README &&
git commit -m add2 -a'