-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathhigh-commit-density-pull-requests.sh
executable file
·34 lines (26 loc) · 1.2 KB
/
high-commit-density-pull-requests.sh
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
29
30
31
32
33
34
. ../../.gh-api-examples.conf
# You will need to do this in a checked out repository
# about 10000 is the biggest batch I could create.
# Clean the file /tmp/head_branches for each run:
> /tmp/head_branches
# for commit in {1..5}
# do
# echo 00000_${commit} > file_00000_${commit}
# git add file_00000_${commit}
# git commit -m "adding file: file_00000_${commit}"
# done
# echo 00000 > file_00000
# git add file_00000
# git commit -m "adding file: file_00000"
# echo branch_00000 >> /tmp/head_branches
# git checkout·
git checkout
echo $base_branch
perl -e '$date = time(); for ("2000".."3000") { printf "git branch branch_%05d\ngit checkout branch_%05d\nfor commit in {1..500}\ndo\n echo %05d_\${commit} > file_%05d_\${commit}\n git add file_%05d_\${commit}\n git commit -m \"adding file: file_%05d_\${commit}\"\ndone\necho branch_%05d >> /tmp/head_branches\n\ngit checkout $ENV{base_branch}\n",$_,$_,$_,$_,$_,$_,$_ }' >/tmp/longlistofbranches.txt
echo "bash tmp/longlistofbranches.txt"
echo "Remember to do:"
echo " git push --all"
echo "to push these branches back to the remote."
echo _______________________________________
cat /tmp/longlistofbranches.txt
echo _______________________________________