Skip to content

Commit 36b78cd

Browse files
Stefan Mochgitster
authored andcommitted
t7001: add test case for --dry-run
Make sure that "git mv --dry-run" does not move file. Signed-off-by: Stefan Moch <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fc849d8 commit 36b78cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t7001-mv.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ test_expect_success \
3838
'git diff-tree -r -M --name-status HEAD^ HEAD | \
3939
grep "^R100..*path1/COPYING..*path0/COPYING"'
4040

41+
test_expect_success \
42+
'mv --dry-run does not move file' \
43+
'git mv -n path0/COPYING MOVED &&
44+
test -f path0/COPYING &&
45+
test ! -f MOVED'
46+
4147
test_expect_success \
4248
'checking -k on non-existing file' \
4349
'git mv -k idontexist path0'

0 commit comments

Comments
 (0)