aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bn_django/git_browse/models.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/bn_django/git_browse/models.py b/bn_django/git_browse/models.py
index 7c41ad6..e805199 100644
--- a/bn_django/git_browse/models.py
+++ b/bn_django/git_browse/models.py
@@ -231,8 +231,16 @@ class Commit(models.Model):
if not raw[1].startswith('parent'):
raw.insert(1, 'parent ')
self.parenthash = raw[1][6:].strip()
- self.author = raw[2].split()[1]
- self.author_date = time.ctime(int(raw[2].split()[-2]))
+ if raw[2].startswith('author'):
+ self.author = raw[2].split()[1]
+ self.author_date = time.ctime(int(raw[2].split()[-2]))
+ elif raw[3].startswith('author'):
+ self.author = raw[3].split()[1]
+ self.author_date = time.ctime(int(raw[3].split()[-2]))
+ elif raw[4].startswith('author'):
+ self.author = raw[4].split()[1]
+ self.author_date = time.ctime(int(raw[4].split()[-2]))
+ else: return
self.committer = raw[3].split()[1]
self.committer_date = time.ctime(int(raw[3].split()[-2]))
self.rawdiff = commands.getoutput(GITPREFIX + ' diff ' \