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

[PATCH 5/7] remote-bzr: avoid unreferred tags

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 6, 2013, 03:49 UTC
Message-ID
<1365220163-13581-6-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1365220163-13581-1-git-send-email-felipe.contreras@gmail.com>
They have no content, there's nothing we can do with them.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-bzr | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index 9466cb9..0bcf8c5 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -654,7 +654,11 @@ def do_capabilities(parser):
 def do_list(parser):
     global tags
     print "? refs/heads/%s" % 'master'
+
+    history = parser.repo.revision_history()
     for tag, revid in parser.repo.tags.get_tag_dict().items():
+        if revid not in history:
+            continue
         print "? refs/tags/%s" % tag
         tags[tag] = revid
     print "@refs/heads/%s HEAD" % 'master'
-- 
1.8.2
Previous: Felipe ContrerasNext: Felipe Contreras
Message 6 of 9 in “remote-bzr: generic updates”
  1. 0/7 remote-bzr: generic updatesFelipe Contreras, Apr 6, 2013
  2. 1/7 remote-bzr: fix directory renamingFelipe Contreras, Apr 6, 2013
  3. 2/7 remote-bzr: remove files before modificationsFelipe Contreras, Apr 6, 2013
  4. 3/7 remote-bzr: set author if availableFelipe Contreras, Apr 6, 2013
  5. 4/7 remote-bzr: only update workingtree on local reposFelipe Contreras, Apr 6, 2013
  6. 5/7 remote-bzr: avoid unreferred tagsFelipe Contreras, Apr 6, 2013
  7. 6/7 remote-bzr: add utf-8 support for fetchingFelipe Contreras, Apr 6, 2013
  8. 7/7 remote-bzr: add utf-8 support for pushingFelipe Contreras, Apr 6, 2013
  9. Felipe ContrerasApr 8, 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.