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

Re: [PATCH] parse_object: try internal cache before reading object db

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2012, 21:55 UTC
Message-ID
<7vehvdn7at.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120105214941.GA31836@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> The worst potential problem I could come up with is if you somehow had
> an object whose "parsed" flag was set, but somehow didn't have its other
> fields set (like type).
> ...
> So I think it is safe short of somebody doing some horrible manual
> munging of a "struct object".

Yeah, I was worried about codepaths like commit-pretty-printing might be mucking with the contents of commit->buffer, perhaps reencoding the text and then calling parse_object() to get the unmodified original back, or something silly like that. But the lookup_object() call at the beginning of the parse_object() already prevents us from doing such a thing, so we should be OK, I would think.

Previous: Jeff KingNext: Jeff King
Message 4 of 17 in “parse_object: try internal cache before reading object db”
  1. parse_object: try internal cache before reading object dbJeff King, Jan 5, 2012
  2. Junio C HamanoJan 5, 2012
  3. Jeff KingJan 5, 2012
  4. Junio C HamanoJan 5, 2012
  5. Jeff KingJan 5, 2012
  6. Jeff KingJan 6, 2012
  7. Junio C HamanoJan 6, 2012
  8. Jeff KingJan 6, 2012
  9. Junio C HamanoJan 6, 2012
  10. Jeff KingJan 6, 2012
  11. 1/2 upload-pack: avoid parsing objects during ref advertisementJeff King, Jan 6, 2012
  12. Junio C HamanoJan 18, 2013
  13. Jeff KingJan 24, 2013
  14. Junio C HamanoJan 24, 2013
  15. Shawn PearceJan 29, 2013
  16. Jeff KingJan 29, 2013
  17. 2/2 upload-pack: avoid parsing tag destinationsJeff King, Jan 6, 2012

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.