]> git.somenet.org - tools/githelper.git/blob - ggcAll.sh
git gc for all subdirs
[tools/githelper.git] / ggcAll.sh
1 #!/bin/bash
2
3 echo "Will run git gc on all repos in this directory in 10 sec."
4 sleep 10
5
6 echo "------OLD------" > /tmp/ggcAll.txt
7 find . -path '*.git' -type d -print0 | du -sch --files0-from=- >> /tmp/ggcAll.txt
8 echo "------NEW------" >> /tmp/ggcAll.txt
9 find . -path '*.git/config' -type f -execdir echo "------------------------------------------" \; -execdir pwd \; -execdir git gc \;
10 find . -path '*.git' -type d -print0 | du -sch --files0-from=- >> /tmp/ggcAll.txt
11 echo "-----STATS-----"
12 cat /tmp/ggcAll.txt
13 rm /tmp/ggcAll.txt
14