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

Re: [PATCH 3/3] commit-graph.c: handle corrupt/missing trees

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2019, 17:55 UTC
Message-ID
<xmqqftl5l5h5.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190906172851.GC23181@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
>>     Answer. There is a single hit inside fsck.c that wants to report
>>     an error without killing ourselves in fsck_commit_buffer().  I
>>     however doubt its use of get_commit_tree() is correct in the
>>     first place.  The function is about validating the commit object
>>     payload manually, without trusting the result of parse_commit(),
>>     and it does read the object name of the tree object; the call to
>>     get_commit_tree() used for reporting the error there should
>>     probably become has_object() on the tree_oid.
>
> I actually think that check should be removed entirely. That function is
> about checking the syntactic validity of the object itself, not about
> connectivity (which is handled separately). We already check that we
> have a valid "tree" pointer earlier in the function.
Of course, you're right.
Previous: Jeff King
Message 15 of 15 in “commit-graph: harden against various corruptions”
  1. 0/3 commit-graph: harden against various corruptionsTaylor Blau, Sep 5, 2019
  2. 1/3 t/t5318: introduce failing 'git commit-graph write' testsTaylor Blau, Sep 5, 2019
  3. Derrick StoleeSep 6, 2019
  4. 2/3 commit-graph.c: handle commit parsing errorsTaylor Blau, Sep 5, 2019
  5. 3/3 commit-graph.c: handle corrupt/missing treesTaylor Blau, Sep 5, 2019
  6. Jeff KingSep 6, 2019
  7. Taylor BlauSep 6, 2019
  8. Jeff KingSep 6, 2019
  9. Derrick StoleeSep 6, 2019
  10. Jeff KingSep 6, 2019
  11. Junio C HamanoSep 6, 2019
  12. Junio C HamanoSep 6, 2019
  13. Jeff KingSep 6, 2019
  14. Jeff KingSep 6, 2019
  15. Junio C HamanoSep 9, 2019

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.