summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81f2bb1)
raw | patch | inline | side by side (parent: 81f2bb1)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Thu, 2 Jun 2005 16:25:44 +0000 (09:25 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Thu, 2 Jun 2005 16:25:44 +0000 (09:25 -0700) |
Ok, now I'm happier.
rev-list.c | patch | blob | history |
diff --git a/rev-list.c b/rev-list.c
index 8775b6558d69686e8446a8a271be753bf939cdd0..56dd814c0e029c0ac6fe2fffa3f65a2d52187b53 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
return 1;
}
+struct commit_list *limit_list(struct commit_list *list, struct commit *end)
+{
+ struct commit_list *newlist = NULL;
+ struct commit_list **p = &newlist;
+ do {
+ struct commit *commit = pop_most_recent_commit(&list, SEEN);
+ struct object *obj = &commit->object;
+
+ if (commit == end || (obj->flags & UNINTERESTING)) {
+ mark_parents_uninteresting(commit);
+ if (everybody_uninteresting(list))
+ break;
+ continue;
+ }
+ p = &commit_list_insert(commit, p)->next;
+ } while (list);
+ return newlist;
+}
+
int main(int argc, char **argv)
{
int nr_sha;
}
commit_list_insert(commit, &list);
- if (end) {
- struct commit_list *newlist = NULL;
- struct commit_list **p = &newlist;
- do {
- struct commit *commit = pop_most_recent_commit(&list, SEEN);
- struct object *obj = &commit->object;
-
- if (commit == end || (obj->flags & UNINTERESTING)) {
- mark_parents_uninteresting(commit);
- if (everybody_uninteresting(list))
- break;
- continue;
- }
- p = &commit_list_insert(commit, p)->next;
- } while (list);
- list = newlist;
- }
+ if (end)
+ list = limit_list(list, end);
show_commit_list(list);
return 0;