Commit 1d1be8ee22a69ad37b6cab510bf5f480dc6df779

Vicent Marti 2010-05-26T01:42:18

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>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;