File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -814,16 +814,14 @@ def gettags(rev=None):
814
814
tags = []
815
815
refs = Git .getrefs ()
816
816
for ref in refs :
817
- m = re .match (r'^(.+)\s+(.+)$' , ref )
817
+ m = re .match (r'^(.+)\s+refs\/tags\/ (.+)$' , ref )
818
818
if m and (not rev or m .group (1 ).startswith (rev )):
819
- if re .match (r'refs\/tags\/' , m .group (2 )): # only tags
820
- t = re .sub (r'refs\/tags\/' , '' , m .group (2 ))
821
- if re .match (r'^(.+)\^\{\}$' , t ): # detect tag "symlink"
822
- t = re .sub (r'\^\{\}$' , '' , t ) # remove "symlink" chars, e.g. some-tag^{}
823
- for tag in tags :
824
- if tag [1 ] == t :
825
- tags .remove (tag )
826
- tags .append (t if rev else [m .group (1 ), t ])
819
+ if re .match (r'^(.+)\^\{\}$' , t ): # detect tag "pointer"
820
+ t = re .sub (r'\^\{\}$' , '' , t ) # remove "pointer" chars, e.g. some-tag^{}
821
+ for tag in tags :
822
+ if tag [1 ] == t :
823
+ tags .remove (tag )
824
+ tags .append (t if rev else [m .group (1 ), t ])
827
825
return tags
828
826
829
827
# Finds branches a rev belongs to
You can’t perform that action at this time.
0 commit comments