diff options
author | Stefan Moch <stefanmoch@mail.de> | 2017-12-31 20:11:55 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-07 11:43:34 -0800 |
commit | 36b78cd9db97f3665935e4b32ff9566e4bbd0d17 (patch) | |
tree | f5d3a73b55aa3ef515acb9e708fd0096d8e86b31 | |
parent | fc849d8d6b90e5c1e0c37bc0d60dd92b2fe7347f (diff) | |
download | git-36b78cd9db97f3665935e4b32ff9566e4bbd0d17.tar.gz |
t7001: add test case for --dry-run
Make sure that "git mv --dry-run" does not move file.
Signed-off-by: Stefan Moch <stefanmoch@mail.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7001-mv.sh | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -39,6 +39,12 @@ test_expect_success \ 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' |