summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/test-bzr.sh
diff options
context:
space:
mode:
authorChristophe Simonis <christophe@kn.gl>2013-04-05 21:49:17 -0600
committerJunio C Hamano <gitster@pobox.com>2013-04-07 00:39:26 -0700
commit82447e33610396a03f481cb26f39a5d7dc6eb193 (patch)
tree6da5d48a61bbd17f299ec6a6f45e699356b5ec9a /contrib/remote-helpers/test-bzr.sh
parent21ccebec0dd1d7e624ea2f22af6ac93686daf34f (diff)
downloadgit-82447e33610396a03f481cb26f39a5d7dc6eb193.tar.gz
remote-bzr: fix directory renaming
Git does not handle directories, renaming a directory is renaming every files in this directory. [fc: added tests] Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/test-bzr.sh')
-rwxr-xr-xcontrib/remote-helpers/test-bzr.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
index 70aa8a010a..f0672f618d 100755
--- a/contrib/remote-helpers/test-bzr.sh
+++ b/contrib/remote-helpers/test-bzr.sh
@@ -140,4 +140,28 @@ test_expect_success 'special modes' '
test_cmp expected actual
'
+cat > expected <<EOF
+100644 blob 54f9d6da5c91d556e6b54340b1327573073030af content
+100755 blob 68769579c3eaadbe555379b9c3538e6628bae1eb executable
+120000 blob 6b584e8ece562ebffc15d38808cd6b98fc3d97ea link
+040000 tree 35c0caa46693cef62247ac89a680f0c5ce32b37b movedir-new
+EOF
+
+test_expect_success 'moving directory' '
+ (cd bzrrepo &&
+ mkdir movedir &&
+ echo one > movedir/one &&
+ echo two > movedir/two &&
+ bzr add movedir &&
+ bzr commit -m movedir &&
+ bzr mv movedir movedir-new &&
+ bzr commit -m movedir-new) &&
+
+ (cd gitrepo &&
+ git pull &&
+ git ls-tree HEAD > ../actual) &&
+
+ test_cmp expected actual
+'
+
test_done