]>
Commit | Line | Data |
---|---|---|
4ff192d3 | 1 | /* |
359fc2d2 | 2 | * Copyright (C) the libgit2 contributors. All rights reserved. |
4ff192d3 BS |
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 | ||
eae0bfdc PP |
10 | #include "common.h" |
11 | ||
4ff192d3 BS |
12 | #include "git2/revwalk.h" |
13 | #include "oidmap.h" | |
14 | #include "commit_list.h" | |
15 | #include "pqueue.h" | |
16 | #include "pool.h" | |
17 | #include "vector.h" | |
18 | ||
b63b76e0 | 19 | #include "oidmap.h" |
4ff192d3 BS |
20 | |
21 | struct git_revwalk { | |
22 | git_repository *repo; | |
23 | git_odb *odb; | |
24 | ||
25 | git_oidmap *commits; | |
26 | git_pool commit_pool; | |
27 | ||
28 | git_commit_list *iterator_topo; | |
29 | git_commit_list *iterator_rand; | |
30 | git_commit_list *iterator_reverse; | |
31 | git_pqueue iterator_time; | |
32 | ||
33 | int (*get_next)(git_commit_list_node **, git_revwalk *); | |
34 | int (*enqueue)(git_revwalk *, git_commit_list_node *); | |
35 | ||
15f7b9b8 | 36 | unsigned walking:1, |
9b5d6cea CMN |
37 | first_parent: 1, |
38 | did_hide: 1, | |
ac3d33df JK |
39 | did_push: 1, |
40 | limited: 1; | |
4ff192d3 BS |
41 | unsigned int sorting; |
42 | ||
ad66bf88 CMN |
43 | /* the pushes and hides */ |
44 | git_commit_list *user_input; | |
892aa808 AG |
45 | |
46 | /* hide callback */ | |
47 | git_revwalk_hide_cb hide_cb; | |
48 | void *hide_cb_payload; | |
4ff192d3 BS |
49 | }; |
50 | ||
d5e44d84 | 51 | git_commit_list_node *git_revwalk__commit_lookup(git_revwalk *walk, const git_oid *oid); |
4ff192d3 | 52 | |
22a2d3d5 UG |
53 | typedef struct { |
54 | int uninteresting; | |
55 | int from_glob; | |
56 | int insert_by_date; | |
57 | } git_revwalk__push_options; | |
58 | ||
59 | #define GIT_REVWALK__PUSH_OPTIONS_INIT { 0 } | |
60 | ||
61 | int git_revwalk__push_commit(git_revwalk *walk, | |
62 | const git_oid *oid, | |
63 | const git_revwalk__push_options *opts); | |
64 | ||
65 | int git_revwalk__push_ref(git_revwalk *walk, | |
66 | const char *refname, | |
67 | const git_revwalk__push_options *opts); | |
68 | ||
69 | int git_revwalk__push_glob(git_revwalk *walk, | |
70 | const char *glob, | |
71 | const git_revwalk__push_options *given_opts); | |
72 | ||
4ff192d3 | 73 | #endif |