From 06023cfa5bcbe760c33c2f67e6805d57a450cc29 Mon Sep 17 00:00:00 2001
From: Someone <someone@somenet.org>
Date: Fri, 18 Jan 2013 04:39:48 +0100
Subject: [PATCH] git gc for all subdirs

---
 ggcAll.sh | 14 ++++++++++++++
 setup.sh  |  1 +
 2 files changed, 15 insertions(+)
 create mode 100755 ggcAll.sh

diff --git a/ggcAll.sh b/ggcAll.sh
new file mode 100755
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
+
diff --git a/setup.sh b/setup.sh
index 56cbcdf..8fc5685 100755
--- 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
 
-- 
2.43.0