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
8struct rev_info {
9 /* Starting list */
10 struct commit_list *commits;
11 struct object_list *pending_objects;
12
13 /* Basic information */
14 const char *prefix;
15 const char **paths;
16
17 /* Traversal flags */
18 unsigned int dense:1,
19 remove_empty_trees:1,
20 lifo:1,
21 topo_order:1,
22 tag_objects:1,
23 tree_objects:1,
24 blob_objects:1,
25 edge_hint:1,
26 limited:1,
27 unpacked:1;
28
29 /* special limits */
30 int max_count;
31 unsigned long max_age;
32 unsigned long min_age;
33};
34
35/* revision.c */
36extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
37extern void prepare_revision_walk(struct rev_info *revs);
38extern struct commit *get_revision(struct rev_info *revs);
39
40extern void mark_parents_uninteresting(struct commit *commit);
41extern void mark_tree_uninteresting(struct tree *tree);
42
43struct name_path {
44 struct name_path *up;
45 int elem_len;
46 const char *elem;
47};
48
49extern struct object_list **add_object(struct object *obj,
50 struct object_list **p,
51 struct name_path *path,
52 const char *name);
53
54#endif