Commit | Line | Data |
---|---|---|
aa338d35 JK |
1 | # Helpers for dealing with large numbers of packs. |
2 | ||
3 | # create $1 nonsense packs, each with a single blob | |
4 | create_packs () { | |
5 | perl -le ' | |
6 | my ($n) = @ARGV; | |
7 | for (1..$n) { | |
8 | print "blob"; | |
9 | print "data <<EOF"; | |
10 | print "$_"; | |
11 | print "EOF"; | |
0a11e402 | 12 | print "checkpoint" |
aa338d35 JK |
13 | } |
14 | ' "$@" | | |
0a11e402 | 15 | git fast-import |
aa338d35 JK |
16 | } |
17 | ||
18 | # create a large number of packs, disabling any gc which might | |
19 | # cause us to repack them | |
20 | setup_many_packs () { | |
21 | git config gc.auto 0 && | |
22 | git config gc.autopacklimit 0 && | |
0a11e402 | 23 | git config fastimport.unpacklimit 0 && |
aa338d35 JK |
24 | create_packs 500 |
25 | } |