We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e934c67 + 77583e7 commit a046013Copy full SHA for a046013
builtin/index-pack.c
@@ -207,8 +207,13 @@ static unsigned check_object(struct object *obj)
207
if (!(obj->flags & FLAG_CHECKED)) {
208
unsigned long size;
209
int type = sha1_object_info(obj->sha1, &size);
210
- if (type != obj->type || type <= 0)
211
- die(_("object of unexpected type"));
+ if (type <= 0)
+ die(_("did not receive expected object %s"),
212
+ sha1_to_hex(obj->sha1));
213
+ if (type != obj->type)
214
+ die(_("object %s: expected type %s, found %s"),
215
+ sha1_to_hex(obj->sha1),
216
+ typename(obj->type), typename(type));
217
obj->flags |= FLAG_CHECKED;
218
return 1;
219
}
0 commit comments