summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3c1163)
raw | patch | inline | side by side (parent: c3c1163)
author | Jon Seymour <jon.seymour@gmail.com> | |
Mon, 20 Jun 2005 02:29:36 +0000 (12:29 +1000) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 20 Jun 2005 03:13:18 +0000 (20:13 -0700) |
If a is reachable from b, then git-rev-list --merge-order b a would
produce a duplicate output of b.
This causes a problem for an upcoming version of gitk since it
breaks the --merge-order ordering invariant.
This patch fixes the problem for the --merge-order switch. A subsequent
patch will fix the problem for the non --merge-order switch.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
produce a duplicate output of b.
This causes a problem for an upcoming version of gitk since it
breaks the --merge-order ordering invariant.
This patch fixes the problem for the --merge-order switch. A subsequent
patch will fix the problem for the non --merge-order switch.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
epoch.c | patch | blob | history |
index fdfaddafbcba305caa0ed092b16c7e960fd45b36..35756a37ee13a752f73568c4570250aa28bf8afa 100644 (file)
--- a/epoch.c
+++ b/epoch.c
base->object.flags |= BOUNDARY;
while (reversed) {
- sort_first_epoch(pop_commit(&reversed), &stack);
- if (reversed) {
- /*
- * If we have more commits to push, then the
- * first push for the next parent may (or may
- * not) represent a discontinuity with respect
- * to the parent currently on the top of
- * the stack.
- *
- * Mark it for checking here, and check it
- * with the next push. See sort_first_epoch()
- * for more details.
- */
- stack->item->object.flags |= DISCONTINUITY;
+ struct commit * next = pop_commit(&reversed);
+
+ if (!(next->object.flags & VISITED)) {
+ sort_first_epoch(next, &stack);
+ if (reversed) {
+ /*
+ * If we have more commits
+ * to push, then the first
+ * push for the next parent may
+ * (or may * not) represent a
+ * discontinuity with respect
+ * to the parent currently on
+ * the top of the stack.
+ *
+ * Mark it for checking here,
+ * and check it with the next
+ * push. See sort_first_epoch()
+ * for more details.
+ */
+ stack->item->object.flags |= DISCONTINUITY;
+ }
}
}