Fixed topological commit sorting (no longerd reversed) and commit time sorting ('prev' pointers in the linked list are no longer lost). Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
diff --git a/src/commit.c b/src/commit.c
index 02e741c..a399208 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -374,6 +374,7 @@ void git_commit_list_timesort(git_commit_list *list)
else
list->head = e;
+ e->prev = list->tail;
list->tail = e;
}
@@ -413,7 +414,7 @@ void git_commit_list_toposort(git_commit_list *list)
}
}
- git_commit_list_push_front(&topo, commit);
+ git_commit_list_push_back(&topo, commit);
}
list->head = topo.head;