Skip to content

Commit

Permalink
t5550-http-fetch: add test for http-fetch
Browse files Browse the repository at this point in the history
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed Nov 26, 2010
1 parent 2bcd9ec commit 6cfc028
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion t/t5550-http-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

Expand All @@ -42,6 +43,17 @@ test_expect_success 'fetch changes via http' '
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 &&
Expand Down

0 comments on commit 6cfc028

Please sign in to comment.