Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t7001: add test case for --dry-run
author
Stefan Moch
<stefanmoch@mail.de>
Sun, 31 Dec 2017 19:11:55 +0000
(20:11 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 7 Feb 2018 19:43:34 +0000
(11:43 -0800)
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>
t/t7001-mv.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
fc849d8
)
diff --git
a/t/t7001-mv.sh
b/t/t7001-mv.sh
index e365d1ff77ee30e0f40b8f01c7e70ebc74e97901..1744ed46079380611f139a0a52cb6cb2c1fed9f3 100755
(executable)
--- 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'