git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] remote-bzr: fix prefix of tags

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 15, 2013, 21:47 UTC
Message-ID
<1366062448-2136-1-git-send-email-felipe.contreras@gmail.com>

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>
---
 contrib/remote-helpers/git-remote-bzr | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index bd25e08..aa7bc97 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')
 
-- 
1.8.2.1.679.g509521a
Message 1 of 1 in “remote-bzr: fix prefix of tags”
  1. remote-bzr: fix prefix of tagsFelipe Contreras, Apr 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.