login
Header Space

 
 

Re: Cogito: cg-clone doesn't like packed tag objects

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Petr Baudis <pasky@...>, Tom Prince <tom.prince@...>, <git@...>
Date: Wednesday, September 28, 2005 - 1:22 pm

Linus Torvalds <torvalds@osdl.org> writes:


I think we could do this instead, to make it less ugly.

b92c9c07fe2d0d89c4f692573583c4753b5355d2	refs/tags/junio-gpg-pub!*
a3eb250f996bf5e12376ec88622c4ccaabf20ea8	refs/tags/v0.99^0

I am not sure what the syntax should be, but the idea is to
express the "refname" side using "extended SHA1" syntax.  In the
above example, I added a postfix '!*' to mean "deref tag
zero-or-more times until you get a non-tag" ('!' to mean deref
tag once and complain if the object is not tag, '!!' is deref
twice, '!!!' is to deref three times and so on).  It might be
better to spell "v0.99^0" as "v0.99!*" in this context. [*1*]

Both git-clone-pack and git-fetch-pack need to be told to ignore
funny tagnames with trailing '!*', otherwise they would ask for
the pointed-at object (which is not harmful but redundant) and
the clone would create "refs/tags/v0.99!*", a file with a funny
name.  Git-peek-remote should report that, and server-info.c
should be told to prepare these extra entries for ls-remote over
other protocols.

But I tend to agree that this is really a special case needed to
support the "tagged objects are automatically followed by tags
that tag them" model, and not needed if we stay in "tag is just
a ref, and a ref is just an object name, and asking for an
object pulls in other objects that are reachable from them"
model.  So it is not a very high priority for me, but I think
this is one way to help Cogito cleanly, and I am willing to see
how much damage this would cause to other parts of the core, *if*
Cogito wants to use this mechanism.

The alternative would be what Pasky outlined in his message --
bypassing git transport layer to fetch single object by hand,
repeatedly dereferencing it until he gets a non-tag.  I think
that is unnecessary misery for him.


[Footnote]

*1* The difference from '^0' is that '!' does not complain on
non-commit, and can be used to peel the onion one layer at a
time.  I do not know how useful the latter is in practice but
somebody may want to express chains of trust by signing tags.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Cogito: cg-clone doesn't like packed tag objects, Junio C Hamano, (Tue Sep 27, 2:36 pm)
Re: Cogito: cg-clone doesn't like packed tag objects, Linus Torvalds, (Tue Sep 27, 5:16 pm)
Re: Cogito: cg-clone doesn't like packed tag objects, Junio C Hamano, (Wed Sep 28, 1:22 pm)
Peeling the onion, Junio C Hamano, (Fri Oct 14, 2:03 am)
Re: Cogito: cg-clone doesn't like packed tag objects, Junio C Hamano, (Tue Sep 27, 6:11 pm)
Re: Cogito: cg-clone doesn't like packed tag objects, Linus Torvalds, (Tue Sep 27, 5:44 pm)
speck-geostationary