Skip to content

Commit afad200

Browse files
felipecgitster
authored andcommitted
remote-bzr: fix prefix of tags
In the current transport-helper code, refs without namespaced refspecs don't work correctly, so let's always use them. Some people reported issues with 'git clone --mirror', and this fixes them, as well as possibly others. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aec3f77 commit afad200

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

contrib/remote-helpers/git-remote-bzr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def export_files(tree, files):
249249
return final
250250

251251
def export_branch(branch, name):
252-
global prefix, dirname
252+
global prefix
253253

254254
ref = '%s/heads/%s' % (prefix, name)
255255
tip = marks.get_tip(name)
@@ -335,8 +335,10 @@ def export_branch(branch, name):
335335
marks.set_tip(name, revid)
336336

337337
def export_tag(repo, name):
338-
global tags
339-
print "reset refs/tags/%s" % name
338+
global tags, prefix
339+
340+
ref = '%s/tags/%s' % (prefix, name)
341+
print "reset %s" % ref
340342
print "from :%u" % rev_to_mark(tags[name])
341343
print
342344

@@ -649,6 +651,7 @@ def do_capabilities(parser):
649651
print "import"
650652
print "export"
651653
print "refspec refs/heads/*:%s/heads/*" % prefix
654+
print "refspec refs/tags/*:%s/tags/*" % prefix
652655

653656
path = os.path.join(dirname, 'marks-git')
654657

0 commit comments

Comments
 (0)