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 a59c872 + c50c431 commit 8577defCopy full SHA for 8577def
diff.c
@@ -2391,10 +2391,14 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
2391
}
2392
else {
2393
enum object_type type;
2394
- if (size_only)
+ if (size_only) {
2395
type = sha1_object_info(s->sha1, &s->size);
2396
- else {
+ if (type < 0)
2397
+ die("unable to read %s", sha1_to_hex(s->sha1));
2398
+ } else {
2399
s->data = read_sha1_file(s->sha1, &type, &s->size);
2400
+ if (!s->data)
2401
2402
s->should_free = 1;
2403
2404
0 commit comments