summaryrefslogtreecommitdiffstats
path: root/test/lots_of_commits.sh
blob: d85034f4edf1838883fb2b6db8708740f60e2706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

# this script makes a repo with lots of commits

# call this command from the test directory:
# ./lots_of_commits.sh; cd testrepo; gg; cd ..

# -e means exit if something fails
# -x means print out simple commands before running them
set -ex

reponame="testrepo"

rm -rf ${reponame}
mkdir ${reponame}
cd ${reponame}

git init

i=2
end=100
while [ $i -le $end ]; do
    echo "file${i}" > file${i}
    git add file${i}
    git commit -m file${i}

    i=$(($i+1))
done