Merge branch 'jc/maint-allow-uninteresting-missing'
authorJunio C Hamano <gitster@pobox.com>
Sun, 1 Feb 2009 02:08:22 +0000 (18:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 1 Feb 2009 02:08:22 +0000 (18:08 -0800)
* jc/maint-allow-uninteresting-missing:
revision traversal: allow UNINTERESTING objects to be missing

1  2 
revision.c
diff --combined revision.c
index b0651845bf627cdfbd0aeebc4abc6366347b2433,1663ac80ea3077193498bf08d8d463efff24ffe1..8603c145817488a4ce80111051129d4d715c597b
@@@ -183,8 -183,11 +183,11 @@@ static struct commit *handle_commit(str
                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 +482,10 @@@ static int add_parents_to_list(struct r
                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)
@@@ -1263,7 -1267,6 +1267,7 @@@ int setup_revisions(int argc, const cha
  
                        if (!strcmp(arg, "--all")) {
                                handle_refs(revs, flags, for_each_ref);
 +                              handle_refs(revs, flags, head_ref);
                                continue;
                        }
                        if (!strcmp(arg, "--branches")) {