> diff --git a/read-cache.c b/read-cache.c > index 9624ce1784..116fd51680 100644 > --- a/read-cache.c > +++ b/read-cache.c > +struct cache_entry *make_transient_cache_entry(unsigned int mode, const struct object_id *oid, > + const char *path, int stage) > +{ > + struct cache_entry *ce; > + int len; > + > + if (!verify_path(path, mode)) { > + error("Invalid path '%s'", path); > + return NULL; > + } > + > + len = strlen(path); > + ce = make_empty_transient_cache_entry(len); > + > + hashcpy(ce->oid.hash, oid->hash); Please use oidcpy() here, too.