summaryrefslogtreecommitdiff
path: root/patterns.py
diff options
context:
space:
mode:
authorGermán Póo-Caamaño <gpoo@gnome.org>2011-06-22 17:25:17 -0700
committerGermán Póo-Caamaño <gpoo@gnome.org>2011-06-22 19:27:47 -0700
commit935be113b3ad3023b102ec00ba0272315a6d27e7 (patch)
tree9a9ecbfea3b997e1417b8a52af1f34f8ad01fa5a /patterns.py
parent4a729f1d7249517bdeeeb1f8f936bdf6b0257b78 (diff)
Added option to get the stats from numstat instead of diff
The option --numstat of git log gives the statistics of lines added and removed file. Hence, it is not necessary to parser a raw diff. Another benefit, it is a less verbose log to be processed, which helps to process long logs. This also prepares the code for counting the changes per file type. Signed-off-by: Germán Póo-Caamaño <gpoo@gnome.org>
Diffstat (limited to 'patterns.py')
-rw-r--r--patterns.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/patterns.py b/patterns.py
index e63efb6..423c521 100644
--- a/patterns.py
+++ b/patterns.py
@@ -37,3 +37,7 @@ PExtMerge = re.compile(r'^ +Merge( branch .* of)? ([^ ]+:[^ ]+)\n$')
PIntMerge = re.compile(r'^ +(Merge|Pull) .* into .*$')
# PIntMerge2 = re.compile(r"^ +Merge branch(es)? '.*$")
PIntMerge2 = re.compile(r"^ +Merge .*$")
+#
+# Another way to get the statistics (per file). It implies --numstat
+Pnumstat = re.compile('^(\d+|-)\s+(\d+|-)\s+(.*)$')
+Prename = re.compile('(.*)\{(.*) => (.*)\}(.*)')