revision traversal: --remove-empty fix (take #2).
[git/gitweb.git] / revision.h
blob31e8f615677634a92992df8404c86a8c2184ff2a
1 #ifndef REVISION_H
2 #define REVISION_H
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 */
10 struct rev_info {
11 /* Starting list */
12 struct commit_list *commits;
13 struct object_list *pending_objects;
15 /* Basic information */
16 const char *prefix;
17 const char **paths;
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;
32 /* special limits */
33 int max_count;
34 unsigned long max_age;
35 unsigned long min_age;
38 /* revision.c */
39 extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
40 extern void prepare_revision_walk(struct rev_info *revs);
41 extern struct commit *get_revision(struct rev_info *revs);
43 extern void mark_parents_uninteresting(struct commit *commit);
44 extern void mark_tree_uninteresting(struct tree *tree);
46 struct name_path {
47 struct name_path *up;
48 int elem_len;
49 const char *elem;
52 extern struct object_list **add_object(struct object *obj,
53 struct object_list **p,
54 struct name_path *path,
55 const char *name);
57 #endif