diff options
author | Cory Johns <cjohns@slashdotmedia.com> | 2013-04-11 18:39:03 +0000 |
---|---|---|
committer | Cory Johns <cjohns@slashdotmedia.com> | 2013-04-11 18:39:42 +0000 |
commit | db82455bd91ce00c22f6ee2b0dc622f117f07137 (patch) | |
tree | 3e34ffbd688faacd55f43d85eefcb4960c0969b6 /git/objects/commit.py | |
parent | 007bd4b8190a6e85831c145e0aed5c68594db556 (diff) | |
download | gitpython-db82455bd91ce00c22f6ee2b0dc622f117f07137.tar.gz |
[#6078] #102 Work-around mergetag blocks by ignoring them
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 9 |
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:] |