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