aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-07-26 19:47:54 +0200
committerJunio C Hamano <junkio@cox.net>2006-07-26 13:36:36 -0700
commitac64a722072bb348476a8a029de9a82073e07fba (patch)
treec08e699f1bad2304d2d7faf15d95de10e7ee4f65 /t
parent11be42a47632a6f7219d34f5e312aa20ae076142 (diff)
downloadgit-ac64a722072bb348476a8a029de9a82073e07fba.tar.gz
git-ac64a722072bb348476a8a029de9a82073e07fba.tar.xz
builtin git-mv: support moving directories
This fixes the builtin mv for the test which Josef provided, and also fixes moving directories into existing directories, as noted by Jon Smirl. In case the destination exists, fail early (this cannot be overridden by -f). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t7001-mv.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 322eaadc7..900ca93cd 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -74,4 +74,8 @@ test_expect_success \
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