Skip to content

Commit

Permalink
Extend testing git-mv for renaming of subdirectories
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Josef Weidendorfer authored and Junio C Hamano committed Jul 26, 2006
1 parent 96256bb commit afd2229
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/t7001-mv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,25 @@ test_expect_success \
'git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path1/COPYING.+path0/COPYING"'

test_expect_success \
'adding another file' \
'cp ../../README path0/README &&
git-add path0/README &&
git-commit -m add2 -a'

test_expect_success \
'moving whole subdirectory' \
'git-mv path0 path2'

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.+path0/COPYING.+path2/COPYING" &&
git-diff-tree -r -M --name-status HEAD^ HEAD | \
grep -E "^R100.+path0/README.+path2/README"'

test_done

0 comments on commit afd2229

Please sign in to comment.