Martin Langhoff <martin.langhoff@gmail.com> writes: > Ok -- I was using ^{commit} which _is_ lazy, but you are > right, ^0 isn't lazy. Ah, my mistake. We would need something like this. --- diff --git a/sha1_name.c b/sha1_name.c index 75c688e..cc320d3 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -323,6 +323,8 @@ static int peel_onion(const char *name, return -1; if (!type_string) { o = deref_tag(o); + if (!o || (!o->parsed && !parse_object(o->sha1))) + return -1; memcpy(sha1, o->sha1, 20); } else { @@ -332,7 +334,7 @@ static int peel_onion(const char *name, */ while (1) { - if (!o) + if (!o || (!o->parsed && !parse_object(o->sha1))) return -1; if (o->type == type_string) { memcpy(sha1, o->sha1, 20); - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Thu Oct 20 15:24:20 2005
This archive was generated by hypermail 2.1.8 : 2005-10-20 15:24:23 EST