Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 180 lines (149 sloc) 4.369 kb
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
1 #ifndef REVISION_H
2 #define REVISION_H
3
6b61ec0 @MadCoder revisions: refactor handle_revision_opt into parse_revision_opt.
MadCoder authored
4 #include "parse-options.h"
0843acf @peff Fix "git log -i --grep"
peff authored
5 #include "grep.h"
6b61ec0 @MadCoder revisions: refactor handle_revision_opt into parse_revision_opt.
MadCoder authored
6
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
7 #define SEEN (1u<<0)
8 #define UNINTERESTING (1u<<1)
7dc0fe3 @torvalds Fix parent rewriting in --early-output
torvalds authored
9 #define TREESAME (1u<<2)
765ac8e Rip out merge-order and make "git log <paths>..." work again.
Linus Torvalds authored
10 #define SHOWN (1u<<3)
7ae0b0c git-log (internal): more options.
Junio C Hamano authored
11 #define TMP_MARK (1u<<4) /* for isolated cases; clean after use */
384e99a rev-list --boundary
Junio C Hamano authored
12 #define BOUNDARY (1u<<5)
2b06469 revision traversal: retire BOUNDARY_SHOW
Junio C Hamano authored
13 #define CHILD_SHOWN (1u<<6)
1b65a5a rev-list --boundary: show boundary commits even when limited otherwise.
Junio C Hamano authored
14 #define ADDED (1u<<7) /* Parents already parsed and added? */
577ed5c rev-list --left-right
Junio C Hamano authored
15 #define SYMMETRIC_LEFT (1u<<8)
e358f3c @dscho sort_in_topological_order(): avoid setting a commit flag
dscho authored
16 #define ALL_REV_FLAGS ((1u<<9)-1)
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
17
33e7018 @hjemli git-log: allow --decorate[=short|full]
hjemli authored
18 #define DECORATE_SHORT_REFS 1
19 #define DECORATE_FULL_REFS 2
20
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
21 struct rev_info;
9153983 Log message printout cleanups
Linus Torvalds authored
22 struct log_info;
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
23
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
24 struct rev_info {
25 /* Starting list */
26 struct commit_list *commits;
1f1e895 Add "named object array" concept
Linus Torvalds authored
27 struct object_array pending;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
28
86ab490 revision walker: Fix --boundary when limited
Junio C Hamano authored
29 /* Parents of shown commits */
30 struct object_array boundary_commits;
31
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
32 /* Basic information */
33 const char *prefix;
02e5422 @MadCoder revisions: split handle_revision_opt() from setup_revisions()
MadCoder authored
34 const char *def;
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
35 void *prune_data;
cdcefbc @torvalds Add "--early-output" log flag for interactive GUI use
torvalds authored
36 unsigned int early_output;
37
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
38 /* Traversal flags */
39 unsigned int dense:1,
53b2c82 @torvalds revision walker: mini clean-up
torvalds authored
40 prune:1,
765ac8e Rip out merge-order and make "git log <paths>..." work again.
Linus Torvalds authored
41 no_merges:1,
b8e8db2 @torvalds git log: add '--merges' flag to match '--no-merges'
torvalds authored
42 merges_only:1,
ba1d450 Tentative built-in "git show"
Linus Torvalds authored
43 no_walk:1,
3131b71 @torvalds Add "--show-all" revision walker flag for debugging
torvalds authored
44 show_all:1,
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
45 remove_empty_trees:1,
9202434 gitweb.cgi history not shown
Linus Torvalds authored
46 simplify_history:1,
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
47 lifo:1,
48 topo_order:1,
6546b59 @gitster revision traversal: show full history with merge simplification
gitster authored
49 simplify_merges:1,
78892e3 @torvalds revision traversal: '--simplify-by-decoration'
torvalds authored
50 simplify_by_decoration:1,
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
51 tag_objects:1,
52 tree_objects:1,
53 blob_objects:1,
d9a8368 Splitting rev-list into revisions lib, end of beginning.
Linus Torvalds authored
54 edge_hint:1,
55 limited:1,
03a9683 @gitster Simplify is_kept_pack()
gitster authored
56 unpacked:1,
86ab490 revision walker: Fix --boundary when limited
Junio C Hamano authored
57 boundary:2,
74bd902 Teach all of log family --left-right output.
Junio C Hamano authored
58 left_right:1,
885cf80 @simpkins revision API: split parent rewriting and parent printing options
simpkins authored
59 rewrite_parents:1,
60 print_parents:1,
0f3a290 @torvalds Add a 'source' decorator for commits
torvalds authored
61 show_source:1,
d467a52 @torvalds Make '--decorate' set an explicit 'show_decorations' flag
torvalds authored
62 show_decorations:1,
0053e90 git-log --first-parent: show only the first parent log
Junio C Hamano authored
63 reverse:1,
498bcd3 @trast rev-list: fix --reverse interaction with --parents
trast authored
64 reverse_output_stage:1,
d7a17ca git-log --cherry-pick A...B
Junio C Hamano authored
65 cherry_pick:1,
ad3f9a7 @torvalds Add '--bisect' revision machinery argument
torvalds authored
66 bisect:1,
0053e90 git-log --first-parent: show only the first parent log
Junio C Hamano authored
67 first_parent_only:1;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
68
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored
69 /* Diff flags */
70 unsigned int diff:1,
71 full_diff:1,
72 show_root_diff:1,
73 no_commit_id:1,
74 verbose_header:1,
75 ignore_merges:1,
76 combine_merges:1,
77 dense_combined_merges:1,
78 always_show_header:1;
79
80 /* Format info */
9153983 Log message printout cleanups
Linus Torvalds authored
81 unsigned int shown_one:1,
02e5422 @MadCoder revisions: split handle_revision_opt() from setup_revisions()
MadCoder authored
82 show_merge:1,
66b2ed0 @gitster Fix "log" family not to be too agressive about showing notes
gitster authored
83 show_notes:1,
84 show_notes_given:1,
85 pretty_given:1,
4da45be @gitster log: teach "terminator" vs "separator" mode to "--pretty=format"
gitster authored
86 abbrev_commit:1,
7fefda5 @simpkins log and rev-list: add --graph option
simpkins authored
87 use_terminator:1,
f4ea32f @peff improve reflog date/number heuristic
peff authored
88 missing_newline:1,
89 date_mode_explicit:1;
8b3dce5 @gitster Teach --stdin option to "log" family
gitster authored
90 unsigned int disable_stdin:1;
91
a7b02cc Add --date={local,relative,default}
Junio C Hamano authored
92 enum date_mode date_mode;
106d710 pack-objects --unpacked=<existing pack> option.
Junio C Hamano authored
93
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored
94 unsigned int abbrev;
95 enum cmit_fmt commit_format;
9153983 Log message printout cleanups
Linus Torvalds authored
96 struct log_info *loginfo;
596524b @dscho Teach fmt-patch about --numbered
dscho authored
97 int nr, total;
698ce6f @dscho fmt-patch: Support --attach
dscho authored
98 const char *mime_boundary;
108dab2 @bebarino format-patch: --attach/inline uses filename instead of SHA1
bebarino authored
99 const char *patch_suffix;
100 int numbered_files;
e1a3734 Improve message-id generation flow control for format-patch
Daniel Barkalow authored
101 char *message_id;
b079c50 @trast format-patch: track several references
trast authored
102 struct string_list *ref_message_ids;
cf2251b format-patch --signoff
Junio C Hamano authored
103 const char *add_signoff;
20ff068 @dscho format-patch: resurrect extra headers from config
dscho authored
104 const char *extra_headers;
52883fb Teach log family --encoding
Junio C Hamano authored
105 const char *log_reencode;
2d9e4a4 @robbat2 Add custom subject prefix support to format-patch (take 3)
robbat2 authored
106 const char *subject_prefix;
c112f68 @dscho format-patch: add --inline option and make --attach a true attachment
dscho authored
107 int no_inline;
9fa3465 @mcostalba Add --log-size to git log to print message size
mcostalba authored
108 int show_log_size;
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored
109
8ecae9b revision traversal: prepare for commit log match.
Junio C Hamano authored
110 /* Filter by commit log message */
0843acf @peff Fix "git log -i --grep"
peff authored
111 struct grep_opt grep_filter;
8ecae9b revision traversal: prepare for commit log match.
Junio C Hamano authored
112
7fefda5 @simpkins log and rev-list: add --graph option
simpkins authored
113 /* Display history graph */
114 struct git_graph *graph;
115
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
116 /* special limits */
d5db6c9 revision: --skip=<n>
Junio C Hamano authored
117 int skip_count;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
118 int max_count;
119 unsigned long max_age;
120 unsigned long min_age;
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
121
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored
122 /* diff info for patches and for paths limiting */
c4e05b1 blame and friends: adjust to multiple pathspec change.
Junio C Hamano authored
123 struct diff_options diffopt;
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored
124 struct diff_options pruning;
c4e05b1 blame and friends: adjust to multiple pathspec change.
Junio C Hamano authored
125
8860fd4 @dscho Teach the revision walker to walk by reflogs with --walk-reflogs
dscho authored
126 struct reflog_walk_info *reflog_info;
f35f560 @gitster revision traversal: --children option
gitster authored
127 struct decoration children;
faf0156 @gitster revision --simplify-merges: use decoration instead of commit->util field
gitster authored
128 struct decoration merge_simplification;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
129 };
130
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
131 #define REV_TREE_SAME 0
ceff8e7 @torvalds Clean up and simplify rev_compare_tree()
torvalds authored
132 #define REV_TREE_NEW 1 /* Only new files */
133 #define REV_TREE_OLD 2 /* Only files removed */
134 #define REV_TREE_DIFFERENT 3 /* Mixed changes */
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
135
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
136 /* revision.c */
cdcefbc @torvalds Add "--early-output" log flag for interactive GUI use
torvalds authored
137 typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
4dc1db0 revision.h: make show_early_output an extern which is defined in revisio...
Brandon Casey authored
138 extern volatile show_early_output_fn_t show_early_output;
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored
139
db6296a Call setup_git_directory() early
Linus Torvalds authored
140 extern void init_revisions(struct rev_info *revs, const char *prefix);
a4a88b2 git-rev-list libification: rev-list walking
Linus Torvalds authored
141 extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
6b61ec0 @MadCoder revisions: refactor handle_revision_opt into parse_revision_opt.
MadCoder authored
142 extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
143 const struct option *options,
144 const char * const usagestr[]);
5d6f093 revision.c: allow injecting revision parameters after setup_revisions().
Junio C Hamano authored
145 extern int handle_revision_arg(const char *arg, struct rev_info *revs,int flags,int cant_be_filename);
146
cc0e6c5 @raalkml Handle return code of parse_commit in revision machinery
raalkml authored
147 extern int prepare_revision_walk(struct rev_info *revs);
a4a88b2 git-rev-list libification: rev-list walking
Linus Torvalds authored
148 extern struct commit *get_revision(struct rev_info *revs);
149
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
150 extern void mark_parents_uninteresting(struct commit *commit);
151 extern void mark_tree_uninteresting(struct tree *tree);
152
153 struct name_path {
154 struct name_path *up;
155 int elem_len;
156 const char *elem;
157 };
158
cf2ab91 @torvalds show_object(): push path_name() call further down
torvalds authored
159 char *path_name(const struct name_path *path, const char *name);
8d2dfc4 @torvalds process_{tree,blob}: show objects without buffering
torvalds authored
160
1f1e895 Add "named object array" concept
Linus Torvalds authored
161 extern void add_object(struct object *obj,
162 struct object_array *p,
163 struct name_path *path,
164 const char *name);
165
166 extern void add_pending_object(struct rev_info *revs, struct object *obj, const char *name);
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
167
3384a2d @gitster shortlog: default to HEAD when the standard input is a tty
gitster authored
168 extern void add_head_to_pending(struct rev_info *);
169
252a7c0 @torvalds Enhance --early-output format
torvalds authored
170 enum commit_action {
171 commit_ignore,
172 commit_show,
173 commit_error
174 };
175
beb5af4 graph API: fix bug in graph_is_interesting()
Adam Simpkins authored
176 extern enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit);
252a7c0 @torvalds Enhance --early-output format
torvalds authored
177 extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);
178
ae56354 First cut at libifying revlist generation
Linus Torvalds authored
179 #endif
Something went wrong with that request. Please try again.