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

Re: [PATCH v2 0/4] push --follow-tags

From
Jeff King <peff@peff.net>
Date
Mar 6, 2013, 08:41 UTC
Message-ID
<20130306084105.GB2018@sigill.intra.peff.net>
In-Reply-To
<1362523639-30566-1-git-send-email-gitster@pobox.com>
On Tue, Mar 05, 2013 at 02:47:15PM -0800, Junio C Hamano wrote:
> The primary change since the last round is that it pushes out only
> annotated tags that are missing from the other side.

Like you, I have mixed feelings on treating annotated tags separately. I don't feel like the previous discussion actually came to a conclusion.

I kind of lean towards the "if we are pushing A..B to a ref, no matter if the remote had the objects already, consider any tag that peels to any commit in A..B". That seems intuitive to me, and reduces the chances of accidentally pushing crufty tags. But I admit it's just a gut feeling.

I think the implementation would just be something like:
  for each ref we are pushing
          mark ref->old_sha1 as UNINTERESTING
          add ref->new_sha1 to pending
  traverse pending commits, marking SEEN
  for each local tag
          if tag does not exist on remote &&
             commit = lookup_commit_reference_gently(tag) &&
             commit->object.flags & SEEN
                    push tag
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 9 in “push --follow-tags”
  1. 0/4 push --follow-tagsJunio C Hamano, Mar 5, 2013
  2. 1/4 commit.c: add clear_commit_marks_many()Junio C Hamano, Mar 5, 2013
  3. Jeff KingMar 6, 2013
  4. Junio C HamanoMar 6, 2013
  5. 2/4 commit.c: add in_merge_bases_many()Junio C Hamano, Mar 5, 2013
  6. 3/4 commit.c: use clear_commit_marks_many() in in_merge_bases_many()Junio C Hamano, Mar 5, 2013
  7. 4/4 push: --follow-tagsJunio C Hamano, Mar 5, 2013
  8. Jeff KingMar 6, 2013
  9. Junio C HamanoMar 6, 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.