diff --git a/cache-tree.c b/cache-tree.c
index 16a65dfac11eccc68acb4a0ed472761f3f84f9c4..d91743775dfbe98d99d8ab25a270af320c8b984e 100644 (file)
--- a/cache-tree.c
+++ b/cache-tree.c
entlen = pathlen - baselen;
}
if (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1))
- return error("invalid object %s", sha1_to_hex(sha1));
+ return error("invalid object %06o %s for '%.*s'",
+ mode, sha1_to_hex(sha1), entlen+baselen, path);
if (ce->ce_flags & CE_REMOVE)
continue; /* entry being removed */