git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More precise tag following
@ 2007-01-26 11:07 Junio C Hamano
  2007-01-26 11:53 ` Junio C Hamano
  2007-01-27  8:01 ` Shawn O. Pearce
  0 siblings, 2 replies; 92+ messages in thread
From: Junio C Hamano @ 2007-01-26 11:07 UTC (permalink / raw)
  To: git

What if (I know, this discussion does not belong here until
1.5.0 final) we had a "reverse" database that keeps track of
what tag references which object, and "git rev-list" knows how
to exploit it?  That is, just like generating a list of objects
that are reachable with --objects option, if we can add a new
option --with-tag very cheaply to list tag objects that would
reach what are in the generated list of objects?

The way current git-fetch "follows" tags is very imprecise,
although it is good enough in practice.  If you happen to
locally have an object that is tagged (and currently we get the
list of non-tag objects that tags eventually refer to in an
out-of-band-ish way), then we fetch the tag and everything it
reaches.  This means if you copied a single commit that is tagged
from somewhere without objects that it refers to, we would end
up fetching beyond that commit to complete it.  Which would not
result in a corrupted repository, but ideally we should not be
fetching the tag in such a case.  And with something like
enhanced rev-list that knows --with-tag it might be possible (I
need to think a bit more about have/want exchange and what
should happen later in fetch-pack and push-pack protocol,
though).

The application of this actually may not be limited to tag
following.  We could define a tag-like objects that attaches to
other objects and enhance its meanings (annotates them) and
treat them the same way as tags for objects traversal and
transfer purposes, so if we were to do this, the option to
exploit reverse database would be called --with-annotation and
not --with-tag.

 - If a single-path following turns out to be too expensive
   (there was a longstanding talk about "git log --single-follow
   $path"; "git blame" also follows a single path although the
   target it follows can fork into two or more when following
   cut&pastes) because we need to explode multi-level trees for
   each commit while traversing commit ancestry, we could define
   an annotation to a commit that lists the set of paths the
   commit touches relative to each of its parents (so the object
   contains N lists of paths), so that pathspec limiting needs
   to open and read only one object to figure out that the trees
   do not have to be opened to skip the commit and/or a merge
   can be simplified.

 - We could define an annotation to a commit that describes what
   fake parents it should have instead of the real ones
   (i.e. grafts implemented in the object database).

Just an idle thought.

^ permalink raw reply	[flat|nested] 92+ messages in thread

end of thread, other threads:[~2007-02-09  7:41 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26 11:07 More precise tag following Junio C Hamano
2007-01-26 11:53 ` Junio C Hamano
2007-01-27  8:01 ` Shawn O. Pearce
2007-01-27  8:41   ` Junio C Hamano
2007-01-27 13:33     ` Jeff King
2007-01-27 17:47     ` Nicolas Pitre
2007-01-27  9:04   ` Simon 'corecode' Schubert
2007-01-27 12:58   ` Johannes Schindelin
2007-01-27 13:50     ` Simon 'corecode' Schubert
2007-01-27 16:30       ` Jakub Narebski
2007-01-27 17:36         ` Linus Torvalds
2007-01-27 16:46       ` Johannes Schindelin
2007-01-27 17:12         ` Simon 'corecode' Schubert
2007-01-27 19:13           ` Johannes Schindelin
2007-01-27 19:55             ` Simon 'corecode' Schubert
2007-01-27 19:41           ` Nicolas Pitre
2007-01-27 17:22   ` Linus Torvalds
2007-01-27 17:56     ` Linus Torvalds
2007-01-27 22:00       ` Junio C Hamano
2007-01-27 22:54         ` Linus Torvalds
2007-01-28  9:27           ` Junio C Hamano
2007-01-28  9:44             ` [PATCH] git-blame --porcelain: quote filename in c-style when needed Junio C Hamano
2007-01-28 14:25             ` [PATCH] git-blame --incremental: don't use pager René Scharfe
2007-01-28 19:09               ` Junio C Hamano
2007-01-28 19:14                 ` Junio C Hamano
2007-01-29  0:32                   ` René Scharfe
2007-01-29  2:35                     ` [PATCH] git blame --progress Junio C Hamano
2007-01-29  7:00                       ` Simon 'corecode' Schubert
2007-01-29 16:54                       ` Alex Riesen
2007-01-29 18:12                       ` Matthias Lederhofer
2007-01-29 19:06                         ` Junio C Hamano
2007-01-29 19:59                       ` René Scharfe
2007-01-29 20:24                         ` Linus Torvalds
2007-01-30  1:53                         ` Junio C Hamano
2007-01-28 19:08             ` More precise tag following Linus Torvalds
2007-01-28 19:18               ` Junio C Hamano
2007-01-28 19:57                 ` Linus Torvalds
2007-01-28 20:01                   ` Junio C Hamano
2007-01-28 20:20                   ` [PATCH] document 'blame --incremental' Junio C Hamano
2007-01-28 21:06                   ` More precise tag following Junio C Hamano
2007-01-28 23:01                     ` Jeff King
2007-01-30  9:22                   ` Junio C Hamano
2007-01-30 15:31                     ` Shawn O. Pearce
2007-01-30 17:02                     ` Linus Torvalds
2007-01-28 19:58                 ` Junio C Hamano
2007-01-29  6:18             ` Shawn O. Pearce
2007-01-29 10:17               ` Junio C Hamano
2007-01-29 10:31                 ` Shawn O. Pearce
2007-01-29 16:24               ` Linus Torvalds
2007-01-29 18:07                 ` Simon 'corecode' Schubert
2007-01-29 19:29                 ` Theodore Tso
2007-01-29 19:45                   ` Linus Torvalds
2007-01-29 20:25                   ` Jakub Narebski
2007-01-29 20:47                     ` Shawn O. Pearce
2007-01-29 21:02                       ` Jakub Narebski
2007-02-09  7:41                   ` Shawn O. Pearce
2007-01-31  8:39                 ` David Kågedal
2007-01-31 10:59                   ` David Kågedal
2007-01-31 16:12                   ` Peter Eriksen
2007-01-31 17:04                     ` David Kågedal
2007-01-31 17:12                       ` Peter Eriksen
2007-01-31 17:35                         ` Jakub Narebski
2007-01-31 20:59                         ` David Kågedal
2007-01-27 18:40     ` Simon 'corecode' Schubert
2007-01-27 19:02       ` Johannes Schindelin
2007-01-27 19:12         ` Simon 'corecode' Schubert
2007-01-27 19:19           ` Johannes Schindelin
2007-01-27 19:59           ` Jakub Narebski
2007-01-27 19:15       ` Linus Torvalds
2007-01-27 19:25         ` Linus Torvalds
2007-01-27 19:54           ` Jakub Narebski
2007-01-27 20:13             ` Linus Torvalds
2007-01-27 19:36         ` Chris Lee
2007-01-28 18:10           ` Theodore Tso
2007-01-28 18:27             ` Linus Torvalds
2007-01-28 22:26           ` David Lang
2007-01-29 17:34             ` Nicolas Pitre
2007-01-29 17:42               ` Linus Torvalds
2007-01-29 17:58                 ` Nicolas Pitre
2007-01-29 19:16                   ` Chris Lee
2007-01-29 23:00           ` Eric Wong
2007-01-30  0:42             ` Eric Wong
2007-01-30  0:48               ` Eric Wong
2007-01-30  8:51               ` Eric Wong
2007-01-27 18:52     ` Jakub Narebski
2007-01-27 20:16     ` Jeff King
2007-01-27 22:39       ` Linus Torvalds
2007-01-27 23:52         ` Jeff King
2007-01-28  2:39           ` Theodore Tso
2007-01-28  3:17             ` Randal L. Schwartz
2007-01-28 13:15             ` Jeff King
2007-01-28  7:40     ` Shawn O. Pearce

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