| test_description='git-mv in subdirs' |
| 'prepare reference tree' \ |
| cp ../../COPYING path0/COPYING && |
| 'moving the file out of subdirectory' \ |
| 'cd path0 && git-mv COPYING ../path1/COPYING' |
| 'cd .. && git-commit -m move-out -a' |
| 'git-diff-tree -r -M --name-status HEAD^ HEAD | \ |
| grep -E "^R100.+path0/COPYING.+path1/COPYING"' |
| 'moving the file back into subdirectory' \ |
| 'cd path0 && git-mv ../path1/COPYING COPYING' |
| 'cd .. && git-commit -m move-in -a' |
| 'git-diff-tree -r -M --name-status HEAD^ HEAD | \ |
| grep -E "^R100.+path1/COPYING.+path0/COPYING"' |