[PATCH] Fixes a problem with --merge-order A B (A is linear descendent of a merge B)
authorJon Seymour <jon.seymour@gmail.com>
Wed, 6 Jul 2005 16:39:35 +0000 (02:39 +1000)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 6 Jul 2005 17:29:30 +0000 (10:29 -0700)
This patch passes the test case introduced by the previous patch.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
epoch.c

diff --git a/epoch.c b/epoch.c
index 7888f1da4ed6023a9c46cb7ce98c78ba606ca0f5..01fe8e4da1396bec334b5055fa6c6506c95fa715 100644 (file)
--- a/epoch.c
+++ b/epoch.c
@@ -606,7 +606,7 @@ int sort_list_in_merge_order(struct commit_list *list, emitter_func emitter)
                while (reversed) {
                        struct commit * next = pop_commit(&reversed);
 
-                       if (!(next->object.flags & VISITED)) {
+                       if (!(next->object.flags & VISITED) && next!=base) {
                                sort_first_epoch(next, &stack);
                                if (reversed) {
                                        /*