summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-31 18:08:22 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-31 18:08:22 -0800
commit2d40cadc25b4cfcf93a23777b74ca36bb5b3ad59 (patch)
treea31ac0c55e7415698af332582a079e501c9dbd00 /revision.c
parentb37f26d8a2d4551b8ee365e66cbaf3d03b05e74d (diff)
parentaeeae1b771020f1ac6692f89563e3f8689c704e7 (diff)
downloadgit-2d40cadc25b4cfcf93a23777b74ca36bb5b3ad59.tar.gz
Merge branch 'jc/maint-allow-uninteresting-missing'
* jc/maint-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 b0651845bf..8603c14581 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)