summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bac15c4)
raw | patch | inline | side by side (parent: bac15c4)
author | Jon Seymour <jon.seymour@gmail.com> | |
Tue, 21 Jun 2005 15:58:46 +0000 (01:58 +1000) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Thu, 23 Jun 2005 00:54:44 +0000 (17:54 -0700) |
The sensible cleanup of the in-memory storage order of commit parents broke the --merge-order
code which was dependent on the previous behaviour of parse_commit().
This patch restores the correctness --merge-order behaviour by taking account of the
new behaviour of parse_commit.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
code which was dependent on the previous behaviour of parse_commit().
This patch restores the correctness --merge-order behaviour by taking account of the
new behaviour of parse_commit.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
epoch.c | patch | blob | history |
index 35756a37ee13a752f73568c4570250aa28bf8afa..a7e84fc59a0927334747effc8d41138a8569a96d 100644 (file)
--- a/epoch.c
+++ b/epoch.c
static void sort_first_epoch(struct commit *head, struct commit_list **stack)
{
struct commit_list *parents;
- struct commit_list *reversed_parents = NULL;
head->object.flags |= VISITED;
- /*
- * parse_commit() builds the parent list in reverse order with respect
- * to the order of the git-commit-tree arguments. So we need to reverse
- * this list to output the oldest (or most "local") commits last.
- */
- for (parents = head->parents; parents; parents = parents->next)
- commit_list_insert(parents->item, &reversed_parents);
-
/*
* TODO: By sorting the parents in a different order, we can alter the
* merge order to show contemporaneous changes in parallel branches
* changes.
*/
- while (reversed_parents) {
- struct commit *parent = pop_commit(&reversed_parents);
+ for (parents = head->parents; parents; parents = parents->next) {
+ struct commit *parent = parents->item;
if (head->object.flags & UNINTERESTING) {
/*
} else {
sort_first_epoch(parent, stack);
- if (reversed_parents) {
+ if (parents) {
/*
* This indicates a possible
* discontinuity it may not be be