1#ifndef REVISION_H
2#define REVISION_H
3
4#define SEEN (1u<<0)
5#define UNINTERESTING (1u<<1)
6#define TREECHANGE (1u<<2)
7#define SHOWN (1u<<3)
8#define TMP_MARK (1u<<4) /* for isolated cases; clean after use */
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,
21 no_merges:1,
22 remove_empty_trees:1,
23 lifo:1,
24 topo_order:1,
25 tag_objects:1,
26 tree_objects:1,
27 blob_objects:1,
28 edge_hint:1,
29 limited:1,
30 unpacked:1;
31
32 /* special limits */
33 int max_count;
34 unsigned long max_age;
35 unsigned long min_age;
36};
37
38/* revision.c */
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
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