diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-02-15 00:36:06 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-15 00:36:06 +0100 |
commit | c59ba68ea7d1b4614fa964403a6c662dca0dd212 (patch) | |
tree | ba54ccb735bf678d57407f9053f179867cc038f5 /rerere.c | |
parent | Merge branch 'rs/receive-pack-remove-find-header' (diff) | |
parent | Always check the return value of `repo_read_object_file()` (diff) | |
download | git-c59ba68ea7d1b4614fa964403a6c662dca0dd212.tar.xz git-c59ba68ea7d1b4614fa964403a6c662dca0dd212.zip |
Merge branch 'js/check-null-from-read-object-file'
The code paths that call repo_read_object_file() have been
tightened to react to errors.
* js/check-null-from-read-object-file:
Always check the return value of `repo_read_object_file()`
Diffstat (limited to 'rerere.c')
-rw-r--r-- | rerere.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -973,6 +973,9 @@ static int handle_cache(struct index_state *istate, mmfile[i].ptr = repo_read_object_file(the_repository, &ce->oid, &type, &size); + if (!mmfile[i].ptr) + die(_("unable to read %s"), + oid_to_hex(&ce->oid)); mmfile[i].size = size; } } |