From 83837ba29017ba3044a829b80a6d9143d1e958a2 Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Thu, 10 Jul 2008 13:14:56 +0200 Subject: [PATCH] gitstats: Bugfix to _parseFileDiff so that it handles diffs with mode changes only Before it would die on patches that contain only mode changes, this commit fixes that. Bug-introduced-in: bc9d1040f323a0b09674f0a1c6ec7048e31580ab --- src/git_stats/diff.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/git_stats/diff.py b/src/git_stats/diff.py index eaaea26..f960c2c 100644 --- a/src/git_stats/diff.py +++ b/src/git_stats/diff.py @@ -142,6 +142,9 @@ def _parseFileDiff(header, chunk): result = fileDiff(header) + if not chunk: + return result + deleted = [] added = [] -- 2.11.4.GIT