summaryrefslogtreecommitdiff
path: root/git/objects/commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r--git/objects/commit.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py
index fd4187b0..8e74f8bf 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -426,11 +426,18 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable):
self.committer, self.committed_date, self.committer_tz_offset = parse_actor_and_date(readline())
+ # we might run into one or more mergetag blocks, skip those for now
+ next_line = readline()
+ while next_line.startswith('mergetag '):
+ next_line = readline()
+ while next_line.startswith(' '):
+ next_line = readline()
+
# now we can have the encoding line, or an empty line followed by the optional
# message.
self.encoding = self.default_encoding
# read encoding or empty line to separate message
- enc = readline()
+ enc = next_line
enc = enc.strip()
if enc:
self.encoding = enc[enc.find(' ')+1:]