Skip to content

Commit c73b239

Browse files
author
Sebastian Thiel
committed
Don't assume there is a tag author in tags
Fixes #842
1 parent 41b9cea commit c73b239

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: git/objects/tag.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def _set_cache_(self, attr):
5959

6060
self.tag = lines[2][4:] # tag <tag name>
6161

62-
tagger_info = lines[3] # tagger <actor> <date>
63-
self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info)
62+
if len(lines) > 3:
63+
tagger_info = lines[3] # tagger <actor> <date>
64+
self.tagger, self.tagged_date, self.tagger_tz_offset = parse_actor_and_date(tagger_info)
6465

6566
# line 4 empty - it could mark the beginning of the next header
6667
# in case there really is no message, it would not exist. Otherwise

0 commit comments

Comments
 (0)