git gc for all subdirs
authorSomeone <someone@somenet.org>
Fri, 18 Jan 2013 03:39:48 +0000 (04:39 +0100)
committerSomeone <someone@somenet.org>
Fri, 18 Jan 2013 03:39:48 +0000 (04:39 +0100)
ggcAll.sh [new file with mode: 0755]
setup.sh

diff --git a/ggcAll.sh b/ggcAll.sh
new file mode 100755 (executable)
index 0000000..677f57f
--- /dev/null
+++ b/ggcAll.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+echo "Will run git gc on all repos in this directory in 10 sec."
+sleep 10
+
+echo "------OLD------" > /tmp/ggcAll.txt
+find . -path '*.git' -type d -print0 | du -sch --files0-from=- >> /tmp/ggcAll.txt
+echo "------NEW------" >> /tmp/ggcAll.txt
+find . -path '*.git/config' -type f -execdir echo "------------------------------------------" \; -execdir pwd \; -execdir git gc \;
+find . -path '*.git' -type d -print0 | du -sch --files0-from=- >> /tmp/ggcAll.txt
+echo "-----STATS-----"
+cat /tmp/ggcAll.txt
+rm /tmp/ggcAll.txt
+
index 56cbcdf811302c3510f5a9d68efc45c47d7b135c..8fc5685916d80cdb91acf76e86441f6845231df8 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -5,4 +5,5 @@ sleep 10
 
 cd ..
 ln -s githelper/gpullAll.sh gpullAll.sh
+ln -s githelper/ggcAll.sh ggcAll.sh