summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-09-30 23:59:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-10-01 09:09:25 (GMT)
commitcd547b4886c5338a70eb8a674bfc40eac5cab3d9 (patch)
tree14a8bc74c5ecf10c978cd43ac1cfff6ee994c9b8 /t/t5510-fetch.sh
parent7155b727c9baae9ef6d7829370aefc09c4ab64e2 (diff)
downloadgit-cd547b4886c5338a70eb8a674bfc40eac5cab3d9.zip
git-cd547b4886c5338a70eb8a674bfc40eac5cab3d9.tar.gz
git-cd547b4886c5338a70eb8a674bfc40eac5cab3d9.tar.bz2
fetch/push: readd rsync support
We lost rsync support when transitioning from shell to C. Support it again (even if the transport is technically deprecated, some people just do not have any chance to use anything else). Also, add a test to t5510. Since rsync transport is not configured by default on most machines, and especially not such that you can write to rsync://127.0.0.1$(pwd)/, it is disabled by default; you can enable it by setting the environment variable TEST_RSYNC. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 439430f..73a4e3c 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -153,4 +153,39 @@ test_expect_success 'bundle should be able to create a full history' '
'
+test "$TEST_RSYNC" && {
+test_expect_success 'fetch via rsync' '
+ git pack-refs &&
+ mkdir rsynced &&
+ cd rsynced &&
+ git init &&
+ git fetch rsync://127.0.0.1$(pwd)/../.git master:refs/heads/master &&
+ git gc --prune &&
+ test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
+ git fsck --full
+'
+
+test_expect_success 'push via rsync' '
+ mkdir ../rsynced2 &&
+ (cd ../rsynced2 &&
+ git init) &&
+ git push rsync://127.0.0.1$(pwd)/../rsynced2/.git master &&
+ cd ../rsynced2 &&
+ git gc --prune &&
+ test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
+ git fsck --full
+'
+
+test_expect_success 'push via rsync' '
+ cd .. &&
+ mkdir rsynced3 &&
+ (cd rsynced3 &&
+ git init) &&
+ git push --all rsync://127.0.0.1$(pwd)/rsynced3/.git &&
+ cd rsynced3 &&
+ test $(git rev-parse master) = $(cd .. && git rev-parse master) &&
+ git fsck --full
+'
+}
+
test_done