diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-14 18:39:18 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-14 18:39:18 -0800 |
commit | 60d64db4614b1007ca37c228923ec1964d5ad394 (patch) | |
tree | d376d7e422b9a6cc51ef9a4b7f90e59f5520247e /commit.c | |
parent | f7a2eb735982e921ae4379f1dcf5f7a023610393 (diff) | |
parent | d7bba815753bf8c31886fcf6bb89c9e6250674a5 (diff) | |
download | git-60d64db4614b1007ca37c228923ec1964d5ad394.tar.gz |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -536,7 +536,7 @@ int count_parents(struct commit * commit) void sort_in_topological_order(struct commit_list ** list) { struct commit_list * next = *list; - struct commit_list * work = NULL; + struct commit_list * work = NULL, **insert; struct commit_list ** pptr = list; struct sort_node * nodes; struct sort_node * next_nodes; @@ -580,11 +580,12 @@ void sort_in_topological_order(struct commit_list ** list) * the tips serve as a starting set for the work queue. */ next=*list; + insert = &work; while (next) { struct sort_node * node = (struct sort_node *)next->item->object.util; if (node->indegree == 0) { - commit_list_insert(next->item, &work); + insert = &commit_list_insert(next->item, insert)->next; } next=next->next; } |