summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c0f869)
raw | patch | inline | side by side (parent: 6c0f869)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 24 Feb 2008 08:07:19 +0000 (03:07 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 24 Feb 2008 08:52:55 +0000 (00:52 -0800) |
If the SHA-1 we are requesting the object for does not exist in
the object database we get a NULL back. Accessing the type from
that is not likely to succeed on any system.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the object database we get a NULL back. Accessing the type from
that is not likely to succeed on any system.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | patch | blob | history |
index 67d2a502afb60050f0ce750c21ae1a42fa5cb803..fb33da111240d9a3d579dfebb05eef951fecee23 100644 (file)
--- a/refs.c
+++ b/refs.c
/* fallback - callers should not call this for unpacked refs */
o = parse_object(base);
- if (o->type == OBJ_TAG) {
+ if (o && o->type == OBJ_TAG) {
o = deref_tag(o, ref, 0);
if (o) {
hashcpy(sha1, o->sha1);