Make it possible to not clobber object.util in sort_in_topological_order (take 2)
[git/git.git] / revision.h
CommitLineData
ae563542
LT
1#ifndef REVISION_H
2#define REVISION_H
3
4#define SEEN (1u<<0)
5#define UNINTERESTING (1u<<1)
a4a88b2b 6#define TREECHANGE (1u<<2)
765ac8ec 7#define SHOWN (1u<<3)
7ae0b0cb 8#define TMP_MARK (1u<<4) /* for isolated cases; clean after use */
ae563542
LT
9
10struct rev_info {
11 /* Starting list */
12 struct commit_list *commits;
13 struct object_list *pending_objects;
14
15 /* Basic information */
16 const char *prefix;
17 const char **paths;
18
19 /* Traversal flags */
20 unsigned int dense:1,
765ac8ec 21 no_merges:1,
ae563542
LT
22 remove_empty_trees:1,
23 lifo:1,
24 topo_order:1,
25 tag_objects:1,
26 tree_objects:1,
27 blob_objects:1,
d9a83684
LT
28 edge_hint:1,
29 limited:1,
30 unpacked:1;
ae563542
LT
31
32 /* special limits */
33 int max_count;
34 unsigned long max_age;
35 unsigned long min_age;
36};
37
38/* revision.c */
a4a88b2b
LT
39extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
40extern void prepare_revision_walk(struct rev_info *revs);
41extern struct commit *get_revision(struct rev_info *revs);
42
ae563542
LT
43extern void mark_parents_uninteresting(struct commit *commit);
44extern void mark_tree_uninteresting(struct tree *tree);
45
46struct name_path {
47 struct name_path *up;
48 int elem_len;
49 const char *elem;
50};
51
52extern struct object_list **add_object(struct object *obj,
53 struct object_list **p,
54 struct name_path *path,
55 const char *name);
56
57#endif