On Mon, Jan 02 2023, Karthik Nayak wrote: > +static struct attr_stack *read_attr_from_blob(struct index_state *istate, > + const struct object_id *tree_oid, > + const char *path, unsigned flags) > +{ > + struct object_id oid; > + unsigned long sz; > + enum object_type type; > + void *buf; > + unsigned short mode; > + > + if (!tree_oid) > + return NULL; > + > + if (get_tree_entry(istate->repo, tree_oid, path, &oid, &mode)) > + return NULL; > + > + buf = read_object_file(&oid, &type, &sz); Here you flip-flop between istate->repo and "the_repository". I think you want to use repo_read_object_file(istate->repo, ...) instead.