git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [0/5] Parsers for git objects, porting some programs

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Apr 18, 2005, 20:12 UTC
Message-ID
<Pine.LNX.4.21.0504181558180.30848-100000@iabervon.org>
In-Reply-To
<Pine.LNX.4.58.0504181126480.15725@ppc970.osdl.org>
On Mon, 18 Apr 2005, Linus Torvalds wrote:
Show 14 quoted lines
> On Sun, 17 Apr 2005, Daniel Barkalow wrote:
> >
> > This series introduces common parsers for objects, and ports the programs
> > that currently use revision.h to them.
> > 
> >  1: the header files
> >  2: the implementations
> >  3: port rev-tree
> >  4: port fsck-cache
> >  5: port merge-base
> 
> Ok, having now looked at the code, I don't have any objections at all. 
> Could you clarify the "fsck" issue about reading the same object twice? 
> When does that happen?

Currently, the fsck-cache code is unpacking the objects to find out what type they are, and the old code would pass the unpacked objects to the parsing code. The new code doesn't take the unpacked objects, so it unpacks them again. (I.e., fsck-cache will look at each object exactly twice). The right solution is to have the internals reorganized slightly such that a "parse_object" method, which does what fsck-cache wants (i.e., parse this object regardless of what type it is, and tell me the type), could be fit in efficiently. But it doesn't affect the header file interface, and it's only relevant to fsck-cache, which wants to look at random junk that it doesn't have a reference to.

	-Daniel
*This .sig left intentionally blank*
Previous: Linus TorvaldsNext: Junio C Hamano
Message 11 of 16 in “[RFC] General object parsing”
  1. Daniel BarkalowApr 18, 2005
  2. Linus TorvaldsApr 18, 2005
  3. Daniel BarkalowApr 18, 2005
  4. 0/5 Parsers for git objects, porting some programsDaniel Barkalow, Apr 18, 2005
  5. 1/5 Header files for object parsingDaniel Barkalow, Apr 18, 2005
  6. 2/5 Implementations of parsing functionsDaniel Barkalow, Apr 18, 2005
  7. 3/5 Port rev-tree to parsing functionsDaniel Barkalow, Apr 18, 2005
  8. 4/5 Port fsck-cache to use parsing functionsDaniel Barkalow, Apr 18, 2005
  9. 5/5 Switch implementations of merge-base, port to parsingDaniel Barkalow, Apr 18, 2005
  10. Linus TorvaldsApr 18, 2005
  11. Daniel BarkalowApr 18, 2005
  12. Junio C HamanoApr 19, 2005
  13. Daniel BarkalowApr 19, 2005
  14. Daniel BarkalowApr 19, 2005
  15. Daniel BarkalowApr 18, 2005
  16. David WoodhouseApr 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.