(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: { (SQ <'performance of tag-following with many tags\n'> <'\n'> <'This tests a fairly pathological case, so rather than rely on a real-world\n'> <'case, we will construct our own repository. The situation is roughly as\n'> <'follows.\n'> <'\n'> <'The parent repository has a large number of tags which are disconnected from\n'> <'the rest of history. That makes them candidates for tag-following, but we never\n'> <'actually grab them (and thus they will impact each subsequent fetch).\n'> <'\n'> <'The child repository is a clone of parent, without the tags, and is at least\n'> <'one commit behind the parent (meaning that we will fetch one object and then\n'> <'examine the tags to see if they need followed). Furthermore, it has a large\n'> <'number of packs.\n'> <'\n'> <'The exact values of "large" here are somewhat arbitrary; I picked values that\n'> <'start to show a noticeable performance problem on my machine, but without\n'> <'taking too long to set up and run the tests.\n'> ) } spids: [4] ) ] spids: [4] ) (C {(.)} {(./perf-lib.sh)}) (FuncDef name: create_history body: (BraceGroup children: [ (Pipeline children: [ (C {(perl)} {(-le)} { (SQ <'\n'> <'\t\tmy ($branch, $n, $blob) = @ARGV;\n'> <'\t\tfor (1..$n) {\n'> <'\t\t\tprint "commit refs/heads/$branch";\n'> <'\t\t\tprint "committer nobody <nobody@example.com> now";\n'> <'\t\t\tprint "data 4";\n'> <'\t\t\tprint "foo";\n'> <'\t\t\tprint "M 100644 $blob $_";\n'> <'\t\t}\n'> <'\t'> ) } {(DQ ($ VSub_At '$@'))} ) (C {(git)} {(fast-import)} {(--date-format) (Lit_Other '=') (now)}) ] negated: False ) ] spids: [42] ) spids: [37 41] ) (FuncDef name: create_tags body: (BraceGroup children: [ (Pipeline children: [ (C {(git)} {(rev-list)} {(DQ ($ VSub_At '$@'))}) (C {(perl)} {(-lne)} {(SQ <'print "create refs/tags/$. $_"'>)}) (C {(git)} {(update-ref)} {(--stdin)}) ] negated: False ) ] spids: [88] ) spids: [83 87] ) (FuncDef name: create_packs body: (BraceGroup children: [ (AndOr children: [ (Pipeline children: [ (C {(perl)} {(-le)} { (SQ <'\n'> <'\t\tmy ($n) = @ARGV;\n'> <'\t\tfor (1..$n) {\n'> <'\t\t\tprint "blob";\n'> <'\t\t\tprint "data <<EOF";\n'> <'\t\t\tprint "$_";\n'> <'\t\t\tprint "EOF";\n'> <'\t\t}\n'> <'\t'> ) } {(DQ ($ VSub_At '$@'))} ) (C {(git)} {(fast-import)}) ] negated: False ) (Pipeline children: [ (C {(git)} {(cat-file)} {(--batch-all-objects)} {(--batch-check) (Lit_Other '=') (SQ <'%(objectname)'>)} ) (While cond: [(C {(read)} {(sha1)})] body: (DoGroup children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$sha1')}) (C {(git)} {(pack-objects)} {(.git/objects/pack/pack)}) ] negated: False ) ] spids: [186 202] ) ) ] negated: False ) ] op_id: Op_DAmp ) ] spids: [130] ) spids: [125 129] ) (C {(test_expect_success)} {(SQ <'create parent and child'>)} { (SQ <'\n'> <'\tgit init parent &&\n'> <'\tgit -C parent commit --allow-empty -m base &&\n'> <'\tgit clone parent child &&\n'> <'\tgit -C parent commit --allow-empty -m trigger-fetch\n'> ) } ) (C {(test_expect_success)} {(SQ <'populate parent tags'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd parent &&\n'> <'\t\tblob=$(echo content | git hash-object -w --stdin) &&\n'> <'\t\tcreate_history cruft 3000 $blob &&\n'> <'\t\tcreate_tags cruft &&\n'> <'\t\tgit branch -D cruft\n'> <'\t)\n'> ) } ) (C {(test_expect_success)} {(SQ <'create child packs'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd child &&\n'> <'\t\tgit config gc.auto 0 &&\n'> <'\t\tgit config gc.autopacklimit 0 &&\n'> <'\t\tcreate_packs 500\n'> <'\t)\n'> ) } ) (C {(test_perf)} {(SQ <fetch>)} { (SQ <'\n'> <'\t# make sure there is something to fetch on each iteration\n'> <'\tgit -C child update-ref -d refs/remotes/origin/master &&\n'> <'\tgit -C child fetch\n'> ) } ) (C {(test_done)}) ] )