]> git.ipfire.org Git - thirdparty/git.git/blobdiff - rerere.c
Start the 2.46 cycle
[thirdparty/git.git] / rerere.c
index ca7e77ba68c1ad4aa49f032906ba419098be0d04..c7e1f8fd25c73ca4630f3682af5ed333858324b0 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -219,6 +219,11 @@ static void read_rr(struct repository *r, struct string_list *rr)
                buf.buf[hexsz] = '\0';
                id = new_rerere_id_hex(buf.buf);
                id->variant = variant;
+               /*
+                * make sure id->collection->status has enough space
+                * for the variant we are interested in
+                */
+               fit_variant(id->collection, variant);
                string_list_insert(rr, path)->util = id;
        }
        strbuf_release(&buf);
@@ -973,6 +978,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;
                }
        }