Skip to content

commit-graph: harden against various corruptions

Taylor Blau git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3t/t5318: introduce failing 'git commit-graph write' testst/t5318-commit-graph.sh+43 -01 reply
2/3commit-graph.c: handle commit parsing errorscommit-graph.c t/t5318-commit-graph.sh+4 -20 replies
3/3commit-graph.c: handle corrupt/missing treescommit-graph.c commit.c t/t5318-commit-graph.sh+9 -310 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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/[email protected]/
[3]: https://public-inbox.org/git/[email protected]/

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