Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae6e26e

Browse files
committed
fix(tag): resolvecommit objects deeply.
As TagObjects can point to other TagObjects, we needto keep going in order to resolve the final commit.Fixes#503
1 parentdf65f51 commitae6e26e

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

‎doc/source/changes.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changelog
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
511
2.0.8 - Features and Bugfixes
612
=============================
713

‎git/refs/tag.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ class TagReference(Reference):
2424
defcommit(self):
2525
""":return: Commit object the tag ref points to"""
2626
obj=self.object
27-
ifobj.type=="commit":
28-
returnobj
29-
elifobj.type=="tag":
30-
# it is a tag object which carries the commit as anobject - we can point to anything
31-
returnobj.object
32-
else:
33-
raiseValueError("Tag %s points to a Blob or Tree - have never seen that before"%self)
27+
whileobj.type!='commit':
28+
ifobj.type=="tag":
29+
# it is atag object which carries the commit as an object - we can point to anything
30+
obj=obj.object
31+
else:
32+
raiseValueError("Tag %s points to a Blob or Tree - have never seen that before"%self)
33+
returnobj
3434

3535
@property
3636
deftag(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp