aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/remote-helpers
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-04-15 16:47:28 -0500
committerJunio C Hamano <gitster@pobox.com>2013-04-15 16:08:40 -0700
commitafad20055888937b100798b597d924d087688645 (patch)
tree89e37af2749c78ad095aa2d2e74d7be779e37a77 /contrib/remote-helpers
parentaec3f77941205909f0671aa9767315a50e20ff87 (diff)
downloadgit-afad20055888937b100798b597d924d087688645.tar.gz
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 <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-xcontrib/remote-helpers/git-remote-bzr9
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index bd25e08202..aa7bc97bee 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -249,7 +249,7 @@ def export_files(tree, files):
return final
def export_branch(branch, name):
- global prefix, dirname
+ global prefix
ref = '%s/heads/%s' % (prefix, name)
tip = marks.get_tip(name)
@@ -335,8 +335,10 @@ def export_branch(branch, name):
marks.set_tip(name, revid)
def export_tag(repo, name):
- global tags
- print "reset refs/tags/%s" % name
+ global tags, prefix
+
+ ref = '%s/tags/%s' % (prefix, name)
+ print "reset %s" % ref
print "from :%u" % rev_to_mark(tags[name])
print
@@ -649,6 +651,7 @@ def do_capabilities(parser):
print "import"
print "export"
print "refspec refs/heads/*:%s/heads/*" % prefix
+ print "refspec refs/tags/*:%s/tags/*" % prefix
path = os.path.join(dirname, 'marks-git')