diff options
-rw-r--r-- | commit-graph.c | 4 | ||||
-rwxr-xr-x | t/t5318-commit-graph.sh | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/commit-graph.c b/commit-graph.c index f2888c203b..6aa6998ecd 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -843,7 +843,9 @@ static void write_graph_chunk_data(struct hashfile *f, int hash_len, uint32_t packedDate[2]; display_progress(ctx->progress, ++ctx->progress_cnt); - parse_commit_no_graph(*list); + if (parse_commit_no_graph(*list)) + die(_("unable to parse commit %s"), + oid_to_hex(&(*list)->object.oid)); hashwrite(f, get_commit_tree_oid(*list)->hash, hash_len); parent = (*list)->parents; diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index c855f81930..abde8d4e90 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -585,7 +585,7 @@ test_expect_success 'get_commit_tree_in_graph works for non-the_repository' ' test_cmp expect actual ' -test_expect_failure 'corrupt commit-graph write (broken parent)' ' +test_expect_success 'corrupt commit-graph write (broken parent)' ' rm -rf repo && git init repo && ( |