summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 17:41:05 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-26 19:24:49 (GMT)
commita1dad607fa5227c844c0f8ab180b811d23792c02 (patch)
treebc30925050cf63d8a245e3c32f74f30956fecdd4 /t/t7001-mv.sh
parent4325b4ad16821e936cb619f5e25d273c281bdeeb (diff)
downloadgit-a1dad607fa5227c844c0f8ab180b811d23792c02.zip
git-a1dad607fa5227c844c0f8ab180b811d23792c02.tar.gz
git-a1dad607fa5227c844c0f8ab180b811d23792c02.tar.bz2
t7001: add test for git-mv dir1 dir2/
If dir2 already exists, git-mv should move dir1 _into_dir2/. Noticed by Jon Smirl. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index d78c56a..322eaad 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -59,4 +59,19 @@ test_expect_success \
git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path0/README.+path2/README"'
+test_expect_success \
+ 'moving whole subdirectory into subdirectory' \
+ 'git-mv path2 path1'
+
+test_expect_success \
+ 'commiting the change' \
+ 'git-commit -m dir-move -a'
+
+test_expect_success \
+ 'checking the commit' \
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
+ git-diff-tree -r -M --name-status HEAD^ HEAD | \
+ grep -E "^R100.+path2/README.+path1/path2/README"'
+
test_done