diff options
author | Vicent Marti <tanoku@gmail.com> | 2010-05-23 16:51:31 +0200 |
---|---|---|
committer | Andreas Ericsson <ae@op5.se> | 2010-06-02 10:32:07 +0200 |
commit | 655d381a1948783d7d26ff9ec5ef54ed6bbefb29 (patch) | |
tree | bcc85e9ef60749eb8a4cd9db1c9f7b3b974ff407 /src/revobject.h | |
parent | 47c31f584e09d79f3674987582a60c7bb6b673c0 (diff) | |
download | libgit2-655d381a1948783d7d26ff9ec5ef54ed6bbefb29.tar.gz |
Add topological sorting and new insertion methods for commit lists.
'git_commit_list_toposort()' and 'git_commit_list_timesort()' now
sort a commit list by topological and time order respectively.
Both sorts are stable and in place.
'git_commit_list_append' has been replaced by 'git_commit_list_push_back'
and 'git_commit_list_push_front'.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/revobject.h')
-rw-r--r-- | src/revobject.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/revobject.h b/src/revobject.h index 4a59d93f4..c073337a4 100644 --- a/src/revobject.h +++ b/src/revobject.h @@ -26,10 +26,19 @@ struct git_revpool_table unsigned int max_count; }; +struct git_revpool_tableit +{ + struct git_revpool_node **nodes; + struct git_revpool_node *current_node; + unsigned int current_pos; + unsigned int size; +}; + typedef struct git_revpool_node git_revpool_node; typedef struct git_revpool_object git_revpool_object; typedef struct git_revpool_table git_revpool_table; +typedef struct git_revpool_tableit git_revpool_tableit; git_revpool_table *git_revpool_table_create(unsigned int min_size); int git_revpool_table_insert(git_revpool_table *table, git_revpool_object *object); |