Skip to content

Commit 657a57a

Browse files
committed
Improved tagobject message handling by not assuming an empty fourth line anymore
1 parent 9840afd commit 657a57a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/git/objects/tag.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ def _set_cache_(self, attr):
6060
tagger_info = lines[3][7:]# tagger <actor> <date>
6161
self.tagger, self.tagged_date = utils.parse_actor_and_date(tagger_info)
6262

63-
# line 4 empty - check git source to figure out purpose
64-
self.message = "\n".join(lines[5:])
63+
# line 4 empty - it could mark the beginning of the next header
64+
# in csse there really is no message, it would not exist. Otherwise
65+
# a newline separates header from message
66+
if len(lines) > 5:
67+
self.message = "\n".join(lines[5:])
68+
else:
69+
self.message = ''
6570
# END check our attributes
6671
else:
6772
super(TagObject, self)._set_cache_(attr)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy