From: Stefan Moch Date: Sun, 31 Dec 2017 19:11:55 +0000 (+0100) Subject: t7001: add test case for --dry-run X-Git-Tag: v2.16.3~3^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/36b78cd9db97f3665935e4b32ff9566e4bbd0d17?ds=inline;hp=--cc t7001: add test case for --dry-run Make sure that "git mv --dry-run" does not move file. Signed-off-by: Stefan Moch Signed-off-by: Junio C Hamano --- 36b78cd9db97f3665935e4b32ff9566e4bbd0d17 diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index e365d1ff77..1744ed4607 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -38,6 +38,12 @@ test_expect_success \ 'git diff-tree -r -M --name-status HEAD^ HEAD | \ grep "^R100..*path1/COPYING..*path0/COPYING"' +test_expect_success \ + 'mv --dry-run does not move file' \ + 'git mv -n path0/COPYING MOVED && + test -f path0/COPYING && + test ! -f MOVED' + test_expect_success \ 'checking -k on non-existing file' \ 'git mv -k idontexist path0'