aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-12 21:44:48 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-12 21:44:48 -0700
commitdaf713dd497ef04855ccecf90ad9aafb17769681 (patch)
tree2bcd165232ae8bec4c859e05c6624c2c0a9bcb06 /revision.c
parente89b991a7fe7e400d96bd69272bf6c9dbade4d2c (diff)
parentaeeae1b771020f1ac6692f89563e3f8689c704e7 (diff)
downloadgit-daf713dd497ef04855ccecf90ad9aafb17769681.tar.gz
git-daf713dd497ef04855ccecf90ad9aafb17769681.tar.xz
Merge branch 'jc/maint-1.6.1-allow-uninteresting-missing' into maint-1.6.1
* jc/maint-1.6.1-allow-uninteresting-missing: revision traversal: allow UNINTERESTING objects to be missing
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/revision.c b/revision.c
index c0df714f6..286e416b7 100644
--- a/revision.c
+++ b/revision.c
@@ -183,8 +183,11 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object
if (!tag->tagged)
die("bad tag");
object = parse_object(tag->tagged->sha1);
- if (!object)
+ if (!object) {
+ if (flags & UNINTERESTING)
+ return NULL;
die("bad object %s", sha1_to_hex(tag->tagged->sha1));
+ }
}
/*
@@ -479,9 +482,10 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit,
while (parent) {
struct commit *p = parent->item;
parent = parent->next;
+ if (p)
+ p->object.flags |= UNINTERESTING;
if (parse_commit(p) < 0)
- return -1;
- p->object.flags |= UNINTERESTING;
+ continue;
if (p->parents)
mark_parents_uninteresting(p);
if (p->object.flags & SEEN)