]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 11 Feb 2009 10:00:22 +0000 (02:00 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Feb 2009 10:00:22 +0000 (02:00 -0800)
* maint:
  revision traversal and pack: notice and die on missing commit

1  2 
revision.c

diff --combined revision.c
index 8603c145817488a4ce80111051129d4d715c597b,c0df714f6cb0825196d1e79cbc53a042529e2d26..286e416b757fa8df731330992fca96773082f75d
@@@ -183,11 -183,8 +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));
 +              }
        }
  
        /*
@@@ -482,10 -479,9 +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)
@@@ -1738,14 -1734,16 +1738,16 @@@ static struct commit *get_revision_1(st
                            (commit->date < revs->max_age))
                                continue;
                        if (add_parents_to_list(revs, commit, &revs->commits, NULL) < 0)
-                               return NULL;
+                               die("Failed to traverse parents of commit %s",
+                                   sha1_to_hex(commit->object.sha1));
                }
  
                switch (simplify_commit(revs, commit)) {
                case commit_ignore:
                        continue;
                case commit_error:
-                       return NULL;
+                       die("Failed to simplify parents of commit %s",
+                           sha1_to_hex(commit->object.sha1));
                default:
                        return commit;
                }