summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df93e33)
raw | patch | inline | side by side (parent: df93e33)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 14 Feb 2008 06:34:34 +0000 (01:34 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Feb 2008 04:11:51 +0000 (20:11 -0800) |
If the tree object we have asked for is deltafied in the packfile and
the delta did not apply correctly or was not able to be decompressed
from the packfile then we can get back NULL instead of the tree data.
This is (part of) the reason why read_sha1_file() can return NULL, so
we need to also handle it the same way.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the delta did not apply correctly or was not able to be decompressed
from the packfile then we can get back NULL instead of the tree data.
This is (part of) the reason why read_sha1_file() can return NULL, so
we need to also handle it the same way.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index a523b171e22f83d6a656b372cf20afe52d27d1b2..9b71ccc479352c6a37b9b9652f1cb1793fdbb01b 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
die("Not a tree: %s", sha1_to_hex(sha1));
t->delta_depth = myoe->depth;
buf = gfi_unpack_entry(myoe, &size);
+ if (!buf)
+ die("Can't load tree %s", sha1_to_hex(sha1));
} else {
enum object_type type;
buf = read_sha1_file(sha1, &type, &size);