From: Johannes Schindelin Date: Wed, 26 Jul 2006 17:41:05 +0000 (+0200) Subject: t7001: add test for git-mv dir1 dir2/ X-Git-Tag: v1.4.2-rc3~57 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a1dad607fa5227c844c0f8ab180b811d23792c02;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index d78c56a2e..322eaadc7 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