From 8aebc9ce66c82af0a2b74dc53b0335326081891b Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Sun, 20 Nov 2011 09:50:28 +0200 Subject: [PATCH] Skip submodules when counting extensions and file sizes. --- gitstats | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitstats b/gitstats index c502dcb..ef7a919 100755 --- a/gitstats +++ b/gitstats @@ -410,6 +410,9 @@ class GitDataCollector(DataCollector): if len(line) == 0: continue parts = re.split('\s+', line, 5) + if parts[0] == '160000' and parts[3] == '-': + # skip submodules + continue sha1 = parts[2] size = int(parts[3]) fullpath = parts[4] -- 2.11.4.GIT