]> git.proxmox.com Git - libgit2.git/blob - src/revwalk.h
Merge pull request #1203 from phkelley/reverse_dak
[libgit2.git] / src / revwalk.h
1 /*
2 * Copyright (C) 2009-2012 the libgit2 contributors
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_revwalk_h__
8 #define INCLUDE_revwalk_h__
9
10 #include "git2/revwalk.h"
11 #include "oidmap.h"
12 #include "commit_list.h"
13 #include "pqueue.h"
14 #include "pool.h"
15 #include "vector.h"
16
17 GIT__USE_OIDMAP;
18
19 struct git_revwalk {
20 git_repository *repo;
21 git_odb *odb;
22
23 git_oidmap *commits;
24 git_pool commit_pool;
25
26 git_commit_list *iterator_topo;
27 git_commit_list *iterator_rand;
28 git_commit_list *iterator_reverse;
29 git_pqueue iterator_time;
30
31 int (*get_next)(git_commit_list_node **, git_revwalk *);
32 int (*enqueue)(git_revwalk *, git_commit_list_node *);
33
34 unsigned walking:1;
35 unsigned int sorting;
36
37 /* merge base calculation */
38 git_commit_list_node *one;
39 git_vector twos;
40 };
41
42 git_commit_list_node *git_revwalk__commit_lookup(git_revwalk *walk, const git_oid *oid);
43
44 #endif