git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] General object parsing
@ 2005-04-18  0:25 Daniel Barkalow
  2005-04-18  1:15 ` Linus Torvalds
  0 siblings, 1 reply; 16+ messages in thread
From: Daniel Barkalow @ 2005-04-18  0:25 UTC (permalink / raw)
  To: Linus Torvalds, Petr Baudis; +Cc: git

After the fiasco with confusing struct revision for a struct commit, I've
worked out something that makes more sense. I've actually ported
fsck-cache, rev-tree, and my merge-base to it, so it should at least be
comprehensive.

The design is as follows:

There is a struct object for each object in the database, although they
are only created on demand. It contains the type and sha1 of the
object, as well as a flag for whether the object contents have been read,
more flags for general use, a list of objects which it references, and a
flag for whether any objects reference it.

Each struct object is embedded in a type-specific struct, which contains
further information. For example, struct commit has the date, the parents,
and the tree.

Parsing objects is progressive; objects are created in an unread state
(with no disk access), and functions can be called to parse each object as
it is determined to be interesting. This should generally allow for only
the necessary portions of a large set of object references to be read.

Any comment on the design, or should I send my implementation?

	-Daniel
*This .sig left intentionally blank*


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

end of thread, other threads:[~2005-04-19  2:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18  0:25 [RFC] General object parsing Daniel Barkalow
2005-04-18  1:15 ` Linus Torvalds
2005-04-18  2:15   ` Daniel Barkalow
2005-04-18  2:33     ` [0/5] Parsers for git objects, porting some programs Daniel Barkalow
2005-04-18  2:35       ` [1/5] Header files for object parsing Daniel Barkalow
2005-04-18  2:36       ` [2/5] Implementations of parsing functions Daniel Barkalow
2005-04-18  2:37       ` [3/5] Port rev-tree to " Daniel Barkalow
2005-04-18  2:40       ` [4/5] Port fsck-cache to use " Daniel Barkalow
2005-04-18  2:42       ` [5/5] Switch implementations of merge-base, port to parsing Daniel Barkalow
2005-04-18 18:34       ` [0/5] Parsers for git objects, porting some programs Linus Torvalds
2005-04-18 20:12         ` Daniel Barkalow
2005-04-19  1:15           ` Junio C Hamano
2005-04-19  1:23             ` Daniel Barkalow
2005-04-19  2:04             ` Daniel Barkalow
2005-04-18  3:51     ` [RFC] General object parsing Daniel Barkalow
2005-04-18  4:45   ` David Woodhouse

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