From: Junio C Hamano Date: Tue, 26 May 2015 03:44:42 +0000 (-0700) Subject: Merge branch 'jk/http-backend-deadlock-2.3' into jk/http-backend-deadlock X-Git-Tag: v2.4.4~9^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=636614f337409abccf60b00dddd04e6628bf85de;p=thirdparty%2Fgit.git Merge branch 'jk/http-backend-deadlock-2.3' into jk/http-backend-deadlock * jk/http-backend-deadlock-2.3: http-backend: spool ref negotiation requests to buffer t5551: factor out tag creation http-backend: fix die recursion with custom handler --- 636614f337409abccf60b00dddd04e6628bf85de diff --cc t/t5551-http-fetch-smart.sh index 66439e58fc,1cca683290..a540c6da23 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@@ -213,33 -213,24 +213,35 @@@ test_expect_success 'cookies stored in test_cmp expect_cookies.txt cookies_tail.txt ' +test_expect_success 'transfer.hiderefs works over smart-http' ' + test_commit hidden && + test_commit visible && + git push public HEAD^:refs/heads/a HEAD:refs/heads/b && + git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \ + config transfer.hiderefs refs/heads/a && + git clone --bare "$HTTPD_URL/smart/repo.git" hidden.git && + test_must_fail git -C hidden.git rev-parse --verify a && + git -C hidden.git rev-parse --verify b +' + - test_expect_success 'create 2,000 tags in the repo' ' - ( - cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && - for i in $(test_seq 2000) + # create an arbitrary number of tags, numbered from tag-$1 to tag-$2 + create_tags () { + rm -f marks && + for i in $(test_seq "$1" "$2") do - echo "commit refs/heads/too-many-refs" - echo "mark :$i" - echo "committer git $i +0000" - echo "data 0" - echo "M 644 inline bla.txt" - echo "data 4" - echo "bla" + # don't use here-doc, because it requires a process + # per loop iteration + echo "commit refs/heads/too-many-refs-$1" && + echo "mark :$i" && + echo "committer git $i +0000" && + echo "data 0" && + echo "M 644 inline bla.txt" && + echo "data 4" && + echo "bla" && # make every commit dangling by always # rewinding the branch after each commit - echo "reset refs/heads/too-many-refs" - echo "from :1" + echo "reset refs/heads/too-many-refs-$1" && + echo "from :$1" done | git fast-import --export-marks=marks && # now assign tags to all the dangling commits we created above