summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-18 17:20:30 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-18 17:40:03 +0200
commit657a57adbff49c553752254c106ce1d5b5690cf8 (patch)
tree07f3af11779b3b7a92a18bb6b8af7de38271b15f /lib
parent9840afda82fafcc3eaf52351c64e2cfdb8962397 (diff)
downloadgitpython-657a57adbff49c553752254c106ce1d5b5690cf8.tar.gz
Improved tagobject message handling by not assuming an empty fourth line anymore
Diffstat (limited to 'lib')
-rw-r--r--lib/git/objects/tag.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/git/objects/tag.py b/lib/git/objects/tag.py
index f54d4b64..b2140551 100644
--- a/lib/git/objects/tag.py
+++ b/lib/git/objects/tag.py
@@ -60,8 +60,13 @@ class TagObject(base.Object):
tagger_info = lines[3][7:]# tagger <actor> <date>
self.tagger, self.tagged_date = utils.parse_actor_and_date(tagger_info)
- # line 4 empty - check git source to figure out purpose
- self.message = "\n".join(lines[5:])
+ # line 4 empty - it could mark the beginning of the next header
+ # in csse there really is no message, it would not exist. Otherwise
+ # a newline separates header from message
+ if len(lines) > 5:
+ self.message = "\n".join(lines[5:])
+ else:
+ self.message = ''
# END check our attributes
else:
super(TagObject, self)._set_cache_(attr)