diff options
Diffstat (limited to 'bn_django/git_wiki')
-rw-r--r-- | bn_django/git_wiki/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py index ba0f5c9..2614739 100644 --- a/bn_django/git_wiki/models.py +++ b/bn_django/git_wiki/models.py @@ -151,6 +151,10 @@ class Commit(models.Model): if raw[1].startswith('parent'): self.parenthash = raw[1][6:].strip() raw.pop(1) + # Sometimes there are multiple parents; this ignores all but the + # first + while raw[1].startswith('parent'): + raw.pop(1) self.author = raw[1].split()[1] self.author_date = time.ctime(int(raw[1].split()[-2])) self.committer = raw[2].split()[1] |