]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/t5551-posix-sed-bre' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Jul 2013 22:37:58 +0000 (15:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jul 2013 22:37:58 +0000 (15:37 -0700)
* jc/t5551-posix-sed-bre:
  t5551: do not use unportable sed '\+'

1  2 
t/t5551-http-fetch.sh

diff --combined t/t5551-http-fetch.sh
index b23efbbfd9586670f1eeee114a1335b9dad4d97f,fe6637b2d672bf669afaf2162d0130c17401bd03..55a866af803452e164e2c11c421b1e63f62d2e1e
@@@ -13,7 -13,6 +13,7 @@@ LIB_HTTPD_PORT=${LIB_HTTPD_PORT-'5551'
  start_httpd
  
  test_expect_success 'setup repository' '
 +      git config push.default matching &&
        echo content >file &&
        git add file &&
        git commit -m one
@@@ -163,30 -162,6 +163,30 @@@ test_expect_success 'invalid Content-Ty
        grep "not valid:" actual
  '
  
 +test_expect_success 'create namespaced refs' '
 +      test_commit namespaced &&
 +      git push public HEAD:refs/namespaces/ns/refs/heads/master &&
 +      git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
 +              symbolic-ref refs/namespaces/ns/HEAD refs/namespaces/ns/refs/heads/master
 +'
 +
 +test_expect_success 'smart clone respects namespace' '
 +      git clone "$HTTPD_URL/smart_namespace/repo.git" ns-smart &&
 +      echo namespaced >expect &&
 +      git --git-dir=ns-smart/.git log -1 --format=%s >actual &&
 +      test_cmp expect actual
 +'
 +
 +test_expect_success 'dumb clone via http-backend respects namespace' '
 +      git --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
 +              config http.getanyfile true &&
 +      GIT_SMART_HTTP=0 git clone \
 +              "$HTTPD_URL/smart_namespace/repo.git" ns-dumb &&
 +      echo namespaced >expect &&
 +      git --git-dir=ns-dumb/.git log -1 --format=%s >actual &&
 +      test_cmp expect actual
 +'
 +
  test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
  
  test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
  
        # now assign tags to all the dangling commits we created above
        tag=$("$PERL_PATH" -e "print \"bla\" x 30") &&
-       sed -e "s/^:\(.\+\) \(.\+\)$/\2 refs\/tags\/$tag-\1/" <marks >>packed-refs
+       sed -e "s|^:\([^ ]*\) \(.*\)$|\2 refs/tags/$tag-\1|" <marks >>packed-refs
        )
  '
  
  test_expect_success EXPENSIVE 'clone the 50,000 tag repo to check OS command line overflow' '
        git clone $HTTPD_URL/smart/repo.git too-many-refs 2>err &&
-       test_line_count = 0 err
+       test_line_count = 0 err &&
+       (
+               cd too-many-refs &&
+               test $(git for-each-ref refs/tags | wc -l) = 50000
+       )
  '
  
  stop_httpd