diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-07 17:02:07 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-07 17:02:07 -0700 |
commit | 9673198ee867cea4ed70d2cf54c1a2eb8f27bb46 (patch) | |
tree | f06a5be02102b0a78f56e18beffa8fa5c3e70b6e /t/t7001-mv.sh | |
parent | 96bc4de85cf810db5c7cd94bf0688a98a64a0bc7 (diff) | |
parent | 7c49cb288173ab5264b3b9e4257aeeb13388334c (diff) | |
download | git-9673198ee867cea4ed70d2cf54c1a2eb8f27bb46.tar.gz git-9673198ee867cea4ed70d2cf54c1a2eb8f27bb46.tar.xz |
Merge branch 'master' into pb/gitpm
This is to resolve the conflicts with Ryan's annotate updates early.
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-x | t/t7001-mv.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 811a4797a..900ca93cd 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -38,4 +38,44 @@ 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_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_expect_failure \ + 'do not move directory over existing directory' \ + 'mkdir path0 && mkdir path0/path2 && git-mv path2 path0' + test_done |