git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-revover-tags-script
Date: Sun, 17 Jul 2005 11:53:29 -0700	[thread overview]
Message-ID: <7voe91jmc6.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: m1psthomf0.fsf@ebiederm.dsl.xmission.com

ebiederm@xmission.com (Eric W. Biederman) writes:

> What we care about are the tag objects, those are the only kind
> that are verifiable and usable remotely.  
>
> Now that I know we do not pull tags currently with any of the
> optimized transports, I would suggest taking the list of commit
> objects we are transporting and for each commit look in the
> remote repo/refs/tags and transferring every tag object we can find
> that refers to that commit.

I do not think it is particularly a good idea to fetch a tag
that refers to a commit when the user asks only for that commit
(e.g. the user said "the head of this remote branch I am
tracking", and the head happened to have been tagged).  Yes, it
may be convenient, but retrieving the commit chain and
retrieving tags are conceptually separate issues.  A tag does
not necessarily refer to a commit, so your reverse index does
not make sense for a tag pointing at a blob, for example.

I think if we have discovery mechanism of remote tags/heads, we
do not need anything else.  You _could_ say something like:

    $ git-list-remote --tags linux-2.6
    9e734775f7c22d2f89943ad6c745571f1930105f	v2.6.12-rc2
    26791a8bcf0e6d33f43aef7682bdb555236d56de	v2.6.12
    ...
    a339981ec18d304f9efeb9ccf01b1f04302edf32	v2.6.13-rc3
    $ git-list-remote --tags linux-2.6 |
      while read sha1 tag;
      do
          git fetch linux-2.6 tag $tag
      done

and you are done.  We did not use the reverse index, nor we used
the --all-tags flag to git-fetch-script.  You do not even need
git-list-remote if you are willing to wget a=summary output from
gitweb and parse the bottom of the page ;-).

The above may not exactly work for linux-2.6 repository because
I think the "tag" form of git-fetch-script may expect to find a
tag that resolves to a commit object and there is the oddball
v2.6.11-tree tag, but you got the general idea.

  reply	other threads:[~2005-07-17 18:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-16 20:20 [PATCH] git-revover-tags-script Eric W. Biederman
2005-07-17  0:51 ` Junio C Hamano
2005-07-17  8:40   ` Eric W. Biederman
2005-07-17 18:53     ` Junio C Hamano [this message]
2005-07-18  0:06       ` Eric W. Biederman
2005-07-18  1:13         ` Junio C Hamano
2005-07-18  5:40           ` Eric W. Biederman
2005-07-18  6:36             ` Junio C Hamano
2005-07-18  0:19       ` Eric W. Biederman
2005-07-20  0:20 ` [RFD] server-info to help clients Junio C Hamano
2005-07-20  0:35   ` David Lang
2005-07-20  1:53     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7voe91jmc6.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=ebiederm@xmission.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).