@matheusbsbs / matheus-bagliano / commits / ad1012ebde
Fork 0

revision.c: really honor --first-parent

In add_parents_to_list, if any parent of a revision had already been SEEN, the current code would continue with the next parent, skipping the test for --first-parent. This patch inverts the test for SEEN so that the test for --first-parent is always performed. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lars Hjemli committed May 12, 2008 at 17:12 UTC ad1012ebde8be471098b5d476a98a02c76c8e75a
1 file changed +4 -4
revision.c
+4 -4
@@ -467,10 +467,10 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit, str
467 if (parse_commit(p) < 0)
468 return -1;
469 p->object.flags |= left_flag;
470 - if (p->object.flags & SEEN)
471 - continue;
472 - p->object.flags |= SEEN;
473 - insert_by_date(p, list);
470 + if (!(p->object.flags & SEEN)) {
471 + p->object.flags |= SEEN;
472 + insert_by_date(p, list);
473 + }
474 if(revs->first_parent_only)
475 break;
476 }