@matheusbsbs / matheus-bagliano / commits / a1dad607fa
Fork 0

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>

Johannes Schindelin committed Jul 26, 2006 at 19:41 UTC a1dad607fa5227c844c0f8ab180b811d23792c02
1 file changed +15
t/t7001-mv.sh
+15
@@ -59,4 +59,19 @@ test_expect_success \
59 git-diff-tree -r -M --name-status HEAD^ HEAD | \
60 grep -E "^R100.+path0/README.+path2/README"'
61
62 +test_expect_success \
63 + 'moving whole subdirectory into subdirectory' \
64 + 'git-mv path2 path1'
65 +
66 +test_expect_success \
67 + 'commiting the change' \
68 + 'git-commit -m dir-move -a'
69 +
70 +test_expect_success \
71 + 'checking the commit' \
72 + 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
73 + grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
74 + git-diff-tree -r -M --name-status HEAD^ HEAD | \
75 + grep -E "^R100.+path2/README.+path1/path2/README"'
76 +
77 test_done