summaryrefslogtreecommitdiff
path: root/t/t5550-http-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-13 05:49:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-12-13 05:49:52 (GMT)
commita0078dee90e9b6baf17fa22cdeaadd8bec49e725 (patch)
tree5e080b2401222e5839a1d4bc6e3abadc9800e936 /t/t5550-http-fetch.sh
parent33935dca6db41f3d84f28abb66f94c1f2cc1974b (diff)
parent6f5185bd2d87dff587e4900aa022f6f9bd088f20 (diff)
downloadgit-a0078dee90e9b6baf17fa22cdeaadd8bec49e725.zip
git-a0078dee90e9b6baf17fa22cdeaadd8bec49e725.tar.gz
git-a0078dee90e9b6baf17fa22cdeaadd8bec49e725.tar.bz2
Merge branch 'tc/http-urls-ends-with-slash'
* tc/http-urls-ends-with-slash: http-fetch: rework url handling http-push: add trailing slash at arg-parse time, instead of later on http-push: check path length before using it http-push: Normalise directory names when pushing to some WebDAV servers http-backend: use end_url_with_slash() url: add str wrapper for end_url_with_slash() shift end_url_with_slash() from http.[ch] to url.[ch] t5550-http-fetch: add test for http-fetch t5550-http-fetch: add missing '&&'
Diffstat (limited to 't/t5550-http-fetch.sh')
-rwxr-xr-xt/t5550-http-fetch.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/t/t5550-http-fetch.sh b/t/t5550-http-fetch.sh
index 8c2ac35..a1883ca 100755
--- a/t/t5550-http-fetch.sh
+++ b/t/t5550-http-fetch.sh
@@ -30,7 +30,8 @@ test_expect_success 'create http-accessible bare repository' '
'
test_expect_success 'clone http repository' '
- git clone $HTTPD_URL/dumb/repo.git clone &&
+ git clone $HTTPD_URL/dumb/repo.git clone-tmpl &&
+ cp -R clone-tmpl clone &&
test_cmp file clone/file
'
@@ -44,11 +45,22 @@ test_expect_success 'clone http repository with authentication' '
test_expect_success 'fetch changes via http' '
echo content >>file &&
git commit -a -m two &&
- git push public
+ git push public &&
(cd clone && git pull) &&
test_cmp file clone/file
'
+test_expect_success 'fetch changes via manual http-fetch' '
+ cp -R clone-tmpl clone2 &&
+
+ HEAD=$(git rev-parse --verify HEAD) &&
+ (cd clone2 &&
+ git http-fetch -a -w heads/master-new $HEAD $(git config remote.origin.url) &&
+ git checkout master-new &&
+ test $HEAD = $(git rev-parse --verify HEAD)) &&
+ test_cmp file clone2/file
+'
+
test_expect_success 'http remote detects correct HEAD' '
git push public master:other &&
(cd clone &&