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

Junio C Hamano <junkio@cox.net> writes:

> 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.

After thinking it through I have to agree but not for your reasons.
The killer argument for me is that tags can be made at any time.
Which means that any incremental scheme that links pulling of tags
to the pulling of the objects they refer to will fail when
the tag is made after you have pulled the object.

So at the very least the computation of which tags to pull needs
to be separate from the computation of which object to pull.

> 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 ;-).

I agree that anything we do will need to look roughly like the
above.  Beyond a simple index of what tags are present
in the objects directory I can't think of anything that would
be a cost savings, except possibly ordering the tags by creation
date.

There are a couple pieces of your example that disturb me.
- The tag names are forced to be the same between trees.
- You don't verify the tags before installing them.
- I view tags as history and by having tag fetching totally
  separate it becomes easy to loose that history.

I do like the fact that when you fetch a tag you are certain
to fetch all of the objects and it refers to.

I don't know what the solution is but we seem to be getting closer.

Eric

  reply	other threads:[~2005-07-18  0:06 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
2005-07-18  0:06       ` Eric W. Biederman [this message]
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=m1hdetnfjq.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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).