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

[PATCH 0/3] commit-graph: harden against various corruptions

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 5, 2019, 22:04 UTC
Message-ID
<cover.1567720960.git.me@ttaylorr.com>
Hi,

This patch series is a polished version of a series I posed in [1], based on the subsequent discussion starting in [2]. It hardens the 'git commit-graph write' code to handle two new types of object corruption that previously resulted in a SIGSEGV, which are:

  - a commit which lists a parent that does not exist, or is corrupt
  - a commit which lists a corrupt tree, or omits the 'tree ' line
    entirely.

The series goes as follows: first, we introduce failing tests that demonstrate the above two cases, then subsequent commits to fix each of them in turn.

When reviewing this series, it is worth keeping in mind that this is really only applying a band-aid to get around a quirk of the object parsing code, which is graciously described by Peff in more detail in [3].

Thanks in advance for your review. I'll deploy this in the meantime to GitHub's fork and report back on the success in the next "What's Cooking".

Thanks, Taylor

[1]: https://public-inbox.org/git/34e4ec793cb0d321d16b88777cd2db64ed7b772e.1567563244.git.me@ttaylorr.com/ [2]: https://public-inbox.org/git/20190904030456.GA28836@sigill.intra.peff.net/ [3]: https://public-inbox.org/git/20190905064723.GC21450@sigill.intra.peff.net/

Taylor Blau (3):
  t/t5318: introduce failing 'git commit-graph write' tests
  commit-graph.c: handle commit parsing errors
  commit-graph.c: handle corrupt/missing trees
 commit-graph.c          | 11 +++++++++--
 commit.c                |  3 ++-
 t/t5318-commit-graph.sh | 43 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 3 deletions(-)

-- 2.23.0

Next: Taylor Blau
Message 1 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.