File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 22Changelog
33=========
44
5+ 2.0.9 - Bugfixes
6+ =============================
7+
8+ * `tag.commit ` will now resolve commits deeply.
9+
10+ * `DiffIndex.iter_change_type(...) ` produces better results when diffing
5112.0.8 - Features and Bugfixes
612=============================
713
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ class TagReference(Reference):
2424 def commit (self ):
2525 """:return: Commit object the tag ref points to"""
2626 obj = self .object
27- if obj .type == " commit" :
28- return obj
29- elif obj . type == " tag" :
30- # it is a tag object which carries the commit as an object - we can point to anything
31- return obj . object
32- else :
33- raise ValueError ( "Tag %s points to a Blob or Tree - have never seen that before" % self )
27+ while obj .type != ' commit' :
28+ if obj . type == "tag" :
29+ # it is a tag object which carries the commit as an object - we can point to anything
30+ obj = obj . object
31+ else :
32+ raise ValueError ( "Tag %s points to a Blob or Tree - have never seen that before" % self )
33+ return obj
3434
3535 @property
3636 def tag (self ):
You can’t perform that action at this time.
0 commit comments