diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-10-01 00:59:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-01 02:09:25 -0700 |
commit | cd547b4886c5338a70eb8a674bfc40eac5cab3d9 (patch) | |
tree | 14a8bc74c5ecf10c978cd43ac1cfff6ee994c9b8 /t/t5510-fetch.sh | |
parent | 7155b727c9baae9ef6d7829370aefc09c4ab64e2 (diff) | |
download | git-cd547b4886c5338a70eb8a674bfc40eac5cab3d9.tar.gz |
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-x | t/t5510-fetch.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 439430f569..73a4e3cbc3 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 |