summaryrefslogtreecommitdiff
path: root/src/revwalk.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-05-23 02:39:57 +0200
committerAndreas Ericsson <ae@op5.se>2010-06-02 10:32:06 +0200
commit5e15176dac8b0baa6f7950f5f763608c83b29093 (patch)
tree5bcc94ea49a378e97626436c5b28be17b54eeac6 /src/revwalk.h
parentc5696427b6d53a3f79baad35ea33c556884a410a (diff)
downloadlibgit2-5e15176dac8b0baa6f7950f5f763608c83b29093.tar.gz
Add commit caching on the commit table.
Properly initialize the pending commits list. Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/revwalk.h')
-rw-r--r--src/revwalk.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/revwalk.h b/src/revwalk.h
index ae692bf0e..14599df10 100644
--- a/src/revwalk.h
+++ b/src/revwalk.h
@@ -4,13 +4,22 @@
#include "git/common.h"
#include "git/revwalk.h"
+#define GIT_REVPOOL_SORT_NONE (0)
+#define GIT_REVPOOL_SORT_TOPO (1 << 0)
+#define GIT_REVPOOL_SORT_TIME (1 << 1)
+#define GIT_REVPOOL_SORT_REVERSE (1 << 2)
+
struct git_revpool {
git_odb *db;
+
git_commit_list iterator;
+ git_commit *(*next_commit)(git_commit_list *);
+
git_commit_list roots;
+ git_revpool_table *commits;
- unsigned walking:1,
- topological_sort:1;
+ unsigned walking:1;
+ unsigned char sorting;
};
#endif /* INCLUDE_revwalk_h__ */