revision traversal and pack: notice and die on missing commit
[gitweb.git] / revision.c
index d79f2b3a7b7fda64c1288f79a971f7b3e6d51cb2..b8c015eedd841389d15bf445d4d98751e21da560 100644 (file)
@@ -1484,14 +1484,16 @@ static struct commit *get_revision_1(struct rev_info *revs)
                            (commit->date < revs->max_age))
                                continue;
                        if (add_parents_to_list(revs, commit, &revs->commits) < 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;
                }