chiark / gitweb /
Pick --revert option (formerly --reverse)
[stgit] / perf / setup.sh
1 krepo='git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git'
2
3 get_linux() {
4     rm -rf linux.orig
5     git clone "$krepo" linux.orig
6 }
7
8 mod_linux() {
9     # Tag the top and base of a very long linear sequence of commits.
10     git tag bomb-top 85040bcb4643cba578839e953f25e2d1965d83d0
11     git tag bomb-base bomb-top~1470
12
13     # Add a file at the base of the linear sequence.
14     git checkout bomb-base
15     echo "woo-hoo" > woo-hoo.txt
16     git add woo-hoo.txt
17     git commit -m "Add a file"
18     git tag add-file
19
20     # Clean up and go to start position.
21     git gc
22     git update-ref refs/heads/master bomb-top
23     git checkout master
24 }
25
26 setup_linux () {
27     get_linux
28     ( cd linux.orig && mod_linux )
29 }
30
31 create_empty () {
32     dir="$1"
33     rm -rf $dir
34     mkdir $dir
35     ( cd $dir && git init )
36 }
37
38 fill_synthetic () {
39     python ../create_synthetic_repo.py | git fast-import
40     git gc --aggressive
41     git update-ref refs/heads/master bomb-top
42     git checkout master
43 }
44
45 setup_synthetic()
46 {
47     create_empty synt.orig
48     ( cd synt.orig && fill_synthetic )
49 }
50
51 setup_linux
52 setup_synthetic