From: Michael J Gruber Date: Thu, 7 Sep 2017 14:02:23 +0000 (+0200) Subject: t6120: test describe and name-rev with deep repos X-Git-Tag: v2.15.0-rc0~74^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31625b34c0e54ae184f28aa5eb5095d21204557e;p=thirdparty%2Fgit.git t6120: test describe and name-rev with deep repos Depending on the implementation of walks, limitted stack size may lead to problems (for recursion). Test name-rev and describe with deep repos and limitted stack size and mark the former with known failure. We add these tests (which add gazillions of commits) last so as to keep the runtime of other subtests the same. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 1997ccde56..dd6dd9df9b 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -279,4 +279,35 @@ test_expect_success 'describe ignoring a borken submodule' ' grep broken out ' +# we require ulimit, this excludes Windows +test_expect_failure ULIMIT_STACK_SIZE 'name-rev works in a deep repo' ' + i=1 && + while test $i -lt 8000 + do + echo "commit refs/heads/master +committer A U Thor $((1000000000 + $i * 100)) +0200 +data <expect && + git name-rev HEAD~4000 >actual && + test_cmp expect actual && + run_with_limited_stack git name-rev HEAD~4000 >actual && + test_cmp expect actual +' + +test_expect_success ULIMIT_STACK_SIZE 'describe works in a deep repo' ' + git tag -f far-far-away HEAD~7999 && + echo "far-far-away" >expect && + git describe --tags --abbrev=0 HEAD~4000 >actual && + test_cmp expect actual && + run_with_limited_stack git describe --tags --abbrev=0 HEAD~4000 >actual && + test_cmp expect actual +' + test_done