diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-05-12 15:50:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-12 15:51:47 -0700 |
commit | 5e2c7cd2c124da05d1807d5ffe61b2771bb755ee (patch) | |
tree | 47ec52edb835b8feaa6ef374b75cedd0863a8f62 /t | |
parent | 92758dd2a2de94c90c0697ef0e8174c3543a47f9 (diff) | |
download | git-5e2c7cd2c124da05d1807d5ffe61b2771bb755ee.tar.gz |
t5551: do not use unportable sed '\+'
The set-up step to prepare a repository with 50000 tags used a
non-porable '\+' to match one-or-more.
The error was not caught because the next test that uses that
repository did not even bother to check if these expected tags were
actually cloned to the resulting repository.
Fix the sed construct to use BRE and update the "clone" test that
wanted to test cloning from such a repository with many refs to
check the resulting repository.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t5551-http-fetch.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh index 47eb76921d..fe6637b2d6 100755 --- a/t/t5551-http-fetch.sh +++ b/t/t5551-http-fetch.sh @@ -184,13 +184,17 @@ 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 |