Skip to content
Newer
Older
100644 242 lines (204 sloc) 5.87 KB
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 25, 2006
1 #ifndef REVISION_H
2 #define REVISION_H
3
6b61ec0 revisions: refactor handle_revision_opt into parse_revision_opt.
Pierre Habouzit authored Jul 9, 2008
4 #include "parse-options.h"
0843acf @peff Fix "git log -i --grep"
peff authored Aug 25, 2008
5 #include "grep.h"
894a9d3 @trast Support showing notes from more than one notes tree
trast authored Mar 12, 2010
6 #include "notes.h"
6b61ec0 revisions: refactor handle_revision_opt into parse_revision_opt.
Pierre Habouzit authored Jul 9, 2008
7
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
8 #define SEEN (1u<<0)
9 #define UNINTERESTING (1u<<1)
7dc0fe3 @torvalds Fix parent rewriting in --early-output
torvalds authored Nov 12, 2007
10 #define TREESAME (1u<<2)
765ac8e Rip out merge-order and make "git log <paths>..." work again.
Linus Torvalds authored Feb 28, 2006
11 #define SHOWN (1u<<3)
7ae0b0c git-log (internal): more options.
Junio C Hamano authored Mar 1, 2006
12 #define TMP_MARK (1u<<4) /* for isolated cases; clean after use */
384e99a rev-list --boundary
Junio C Hamano authored Mar 27, 2006
13 #define BOUNDARY (1u<<5)
2b06469 revision traversal: retire BOUNDARY_SHOW
Junio C Hamano authored Mar 5, 2007
14 #define CHILD_SHOWN (1u<<6)
1b65a5a rev-list --boundary: show boundary commits even when limited otherwise.
Junio C Hamano authored Apr 16, 2006
15 #define ADDED (1u<<7) /* Parents already parsed and added? */
577ed5c rev-list --left-right
Junio C Hamano authored Oct 22, 2006
16 #define SYMMETRIC_LEFT (1u<<8)
adbbb31 @mjg revision.c: introduce --cherry-mark
mjg authored Mar 7, 2011
17 #define PATCHSAME (1u<<9)
18 #define ALL_REV_FLAGS ((1u<<10)-1)
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
19
33e7018 @hjemli git-log: allow --decorate[=short|full]
hjemli authored Aug 15, 2009
20 #define DECORATE_SHORT_REFS 1
21 #define DECORATE_FULL_REFS 2
22
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored Mar 10, 2006
23 struct rev_info;
9153983 Log message printout cleanups
Linus Torvalds authored Apr 17, 2006
24 struct log_info;
894a9d3 @trast Support showing notes from more than one notes tree
trast authored Mar 12, 2010
25 struct string_list;
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored Mar 10, 2006
26
281eee4 @gitster revision: keep track of the end-user input from the command line
gitster authored Aug 25, 2011
27 struct rev_cmdline_info {
28 unsigned int nr;
29 unsigned int alloc;
30 struct rev_cmdline_entry {
31 struct object *item;
32 const char *name;
33 enum {
34 REV_CMD_REF,
35 REV_CMD_PARENTS_ONLY,
36 REV_CMD_LEFT,
37 REV_CMD_RIGHT,
38 REV_CMD_REV
39 } whence;
40 unsigned flags;
41 } *rev;
42 };
43
ca92e59 @martinvonz teach log --no-walk=unsorted, which avoids sorting
martinvonz authored Aug 28, 2012
44 #define REVISION_WALK_WALK 0
45 #define REVISION_WALK_NO_WALK_SORTED 1
46 #define REVISION_WALK_NO_WALK_UNSORTED 2
47
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
48 struct rev_info {
49 /* Starting list */
50 struct commit_list *commits;
1f1e895 Add "named object array" concept
Linus Torvalds authored Jun 19, 2006
51 struct object_array pending;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
52
86ab490 revision walker: Fix --boundary when limited
Junio C Hamano authored Mar 5, 2007
53 /* Parents of shown commits */
54 struct object_array boundary_commits;
55
281eee4 @gitster revision: keep track of the end-user input from the command line
gitster authored Aug 26, 2011
56 /* The end-points specified by the end user */
57 struct rev_cmdline_info cmdline;
58
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
59 /* Basic information */
60 const char *prefix;
02e5422 revisions: split handle_revision_opt() from setup_revisions()
Pierre Habouzit authored Jul 8, 2008
61 const char *def;
afe069d @pclouds struct rev_info: convert prune_data to struct pathspec
pclouds authored Dec 17, 2010
62 struct pathspec prune_data;
cc243c3 @gitster show: --ignore-missing
gitster authored May 18, 2011
63 unsigned int early_output:1,
64 ignore_missing:1;
cdcefbc @torvalds Add "--early-output" log flag for interactive GUI use
torvalds authored Nov 3, 2007
65
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
66 /* Traversal flags */
67 unsigned int dense:1,
53b2c82 @torvalds revision walker: mini clean-up
torvalds authored Nov 5, 2007
68 prune:1,
ca92e59 @martinvonz teach log --no-walk=unsorted, which avoids sorting
martinvonz authored Aug 29, 2012
69 no_walk:2,
3131b71 @torvalds Add "--show-all" revision walker flag for debugging
torvalds authored Feb 9, 2008
70 show_all:1,
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
71 remove_empty_trees:1,
9202434 gitweb.cgi history not shown
Linus Torvalds authored Jun 11, 2006
72 simplify_history:1,
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
73 lifo:1,
74 topo_order:1,
6546b59 @gitster revision traversal: show full history with merge simplification
gitster authored Jul 31, 2008
75 simplify_merges:1,
78892e3 @torvalds revision traversal: '--simplify-by-decoration'
torvalds authored Nov 3, 2008
76 simplify_by_decoration:1,
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
77 tag_objects:1,
78 tree_objects:1,
79 blob_objects:1,
5a48d24 @gitster rev-list --verify-object
gitster authored Sep 1, 2011
80 verify_objects:1,
d9a8368 Splitting rev-list into revisions lib, end of beginning.
Linus Torvalds authored Feb 27, 2006
81 edge_hint:1,
82 limited:1,
03a9683 @gitster Simplify is_kept_pack()
gitster authored Feb 28, 2009
83 unpacked:1,
86ab490 revision walker: Fix --boundary when limited
Junio C Hamano authored Mar 5, 2007
84 boundary:2,
f69c501 @trast rev-list: introduce --count option
trast authored Jun 10, 2010
85 count:1,
74bd902 Teach all of log family --left-right output.
Junio C Hamano authored Dec 16, 2006
86 left_right:1,
60adf7d @mjg revlist.c: introduce --left/right-only for unsymmetric picking
mjg authored Feb 21, 2011
87 left_only:1,
88 right_only:1,
885cf80 @simpkins revision API: split parent rewriting and parent printing options
simpkins authored May 4, 2008
89 rewrite_parents:1,
90 print_parents:1,
0f3a290 @torvalds Add a 'source' decorator for commits
torvalds authored Oct 27, 2008
91 show_source:1,
d467a52 @torvalds Make '--decorate' set an explicit 'show_decorations' flag
torvalds authored Nov 3, 2008
92 show_decorations:1,
0053e90 git-log --first-parent: show only the first parent log
Junio C Hamano authored Mar 13, 2007
93 reverse:1,
498bcd3 @trast rev-list: fix --reverse interaction with --parents
trast authored Aug 29, 2008
94 reverse_output_stage:1,
d7a17ca git-log --cherry-pick A...B
Junio C Hamano authored Apr 9, 2007
95 cherry_pick:1,
adbbb31 @mjg revision.c: introduce --cherry-mark
mjg authored Mar 7, 2011
96 cherry_mark:1,
ad3f9a7 @torvalds Add '--bisect' revision machinery argument
torvalds authored Oct 27, 2009
97 bisect:1,
ebdc94f @gitster revision: --ancestry-path
gitster authored Apr 20, 2010
98 ancestry_path:1,
0053e90 git-log --first-parent: show only the first parent log
Junio C Hamano authored Mar 13, 2007
99 first_parent_only:1;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
100
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored Apr 14, 2006
101 /* Diff flags */
102 unsigned int diff:1,
103 full_diff:1,
104 show_root_diff:1,
105 no_commit_id:1,
106 verbose_header:1,
107 ignore_merges:1,
108 combine_merges:1,
109 dense_combined_merges:1,
110 always_show_header:1;
111
112 /* Format info */
9153983 Log message printout cleanups
Linus Torvalds authored Apr 17, 2006
113 unsigned int shown_one:1,
02e5422 revisions: split handle_revision_opt() from setup_revisions()
Pierre Habouzit authored Jul 8, 2008
114 show_merge:1,
66b2ed0 @gitster Fix "log" family not to be too agressive about showing notes
gitster authored Jan 20, 2010
115 show_notes:1,
116 show_notes_given:1,
0c37f1f @gitster log: --show-signature
gitster authored Oct 18, 2011
117 show_signature:1,
66b2ed0 @gitster Fix "log" family not to be too agressive about showing notes
gitster authored Jan 20, 2010
118 pretty_given:1,
4da45be @gitster log: teach "terminator" vs "separator" mode to "--pretty=format"
gitster authored Apr 7, 2008
119 abbrev_commit:1,
0c47695 @jaysoffian Add log.abbrevCommit config variable
jaysoffian authored May 18, 2011
120 abbrev_commit_given:1,
7fefda5 @simpkins log and rev-list: add --graph option
simpkins authored May 4, 2008
121 use_terminator:1,
f4ea32f @peff improve reflog date/number heuristic
peff authored Sep 24, 2009
122 missing_newline:1,
9553d2b @peff format-patch: preserve subject newlines with -k
peff authored May 26, 2011
123 date_mode_explicit:1,
124 preserve_subject:1;
8b3dce5 @gitster Teach --stdin option to "log" family
gitster authored Nov 3, 2009
125 unsigned int disable_stdin:1;
4a43d37 revision: add leak_pending flag
René Scharfe authored Oct 1, 2011
126 unsigned int leak_pending:1;
8b3dce5 @gitster Teach --stdin option to "log" family
gitster authored Nov 3, 2009
127
a7b02cc Add --date={local,relative,default}
Junio C Hamano authored Apr 24, 2007
128 enum date_mode date_mode;
106d710 pack-objects --unpacked=<existing pack> option.
Junio C Hamano authored Sep 6, 2006
129
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored Apr 14, 2006
130 unsigned int abbrev;
131 enum cmit_fmt commit_format;
9153983 Log message printout cleanups
Linus Torvalds authored Apr 17, 2006
132 struct log_info *loginfo;
596524b @dscho Teach fmt-patch about --numbered
dscho authored May 5, 2006
133 int nr, total;
698ce6f @dscho fmt-patch: Support --attach
dscho authored May 20, 2006
134 const char *mime_boundary;
108dab2 @bebarino format-patch: --attach/inline uses filename instead of SHA1
bebarino authored Mar 22, 2009
135 const char *patch_suffix;
136 int numbered_files;
e1a3734 Improve message-id generation flow control for format-patch
Daniel Barkalow authored Feb 18, 2008
137 char *message_id;
b079c50 @trast format-patch: track several references
trast authored Feb 19, 2009
138 struct string_list *ref_message_ids;
cf2251b format-patch --signoff
Junio C Hamano authored May 31, 2006
139 const char *add_signoff;
20ff068 @dscho format-patch: resurrect extra headers from config
dscho authored Jun 2, 2006
140 const char *extra_headers;
52883fb Teach log family --encoding
Junio C Hamano authored Dec 25, 2006
141 const char *log_reencode;
2d9e4a4 @robbat2 Add custom subject prefix support to format-patch (take 3)
robbat2 authored Apr 11, 2007
142 const char *subject_prefix;
c112f68 @dscho format-patch: add --inline option and make --attach a true attachment
dscho authored Mar 4, 2007
143 int no_inline;
9fa3465 @mcostalba Add --log-size to git log to print message size
mcostalba authored Jul 20, 2007
144 int show_log_size;
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored Apr 14, 2006
145
8ecae9b revision traversal: prepare for commit log match.
Junio C Hamano authored Sep 17, 2006
146 /* Filter by commit log message */
0843acf @peff Fix "git log -i --grep"
peff authored Aug 25, 2008
147 struct grep_opt grep_filter;
8ecae9b revision traversal: prepare for commit log match.
Junio C Hamano authored Sep 17, 2006
148
7fefda5 @simpkins log and rev-list: add --graph option
simpkins authored May 4, 2008
149 /* Display history graph */
150 struct git_graph *graph;
151
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
152 /* special limits */
d5db6c9 revision: --skip=<n>
Junio C Hamano authored Dec 19, 2006
153 int skip_count;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
154 int max_count;
155 unsigned long max_age;
156 unsigned long min_age;
ad5aeed @mjg revision.c: introduce --min-parents and --max-parents options
mjg authored Mar 21, 2011
157 int min_parents;
158 int max_parents;
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored Mar 10, 2006
159
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored Apr 14, 2006
160 /* diff info for patches and for paths limiting */
c4e05b1 blame and friends: adjust to multiple pathspec change.
Junio C Hamano authored Apr 10, 2006
161 struct diff_options diffopt;
cd2bdc5 Common option parsing for "git log --diff" and friends
Linus Torvalds authored Apr 14, 2006
162 struct diff_options pruning;
c4e05b1 blame and friends: adjust to multiple pathspec change.
Junio C Hamano authored Apr 11, 2006
163
8860fd4 @dscho Teach the revision walker to walk by reflogs with --walk-reflogs
dscho authored Jan 11, 2007
164 struct reflog_walk_info *reflog_info;
f35f560 @gitster revision traversal: --children option
gitster authored Apr 3, 2008
165 struct decoration children;
faf0156 @gitster revision --simplify-merges: use decoration instead of commit->util field
gitster authored Aug 14, 2008
166 struct decoration merge_simplification;
894a9d3 @trast Support showing notes from more than one notes tree
trast authored Mar 12, 2010
167
168 /* notes-specific options: which refs to show */
169 struct display_notes_opt notes_opt;
f69c501 @trast rev-list: introduce --count option
trast authored Jun 10, 2010
170
171 /* commit counts */
172 int count_left;
173 int count_right;
b388e14 @mjg rev-list --count: separate count for --cherry-mark
mjg authored Apr 26, 2011
174 int count_same;
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
175 };
176
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored Mar 10, 2006
177 #define REV_TREE_SAME 0
ceff8e7 @torvalds Clean up and simplify rev_compare_tree()
torvalds authored Jun 2, 2009
178 #define REV_TREE_NEW 1 /* Only new files */
179 #define REV_TREE_OLD 2 /* Only files removed */
180 #define REV_TREE_DIFFERENT 3 /* Mixed changes */
8efdc32 rev-lib: Make it easy to do rename tracking (take 2)
Fredrik Kuivinen authored Mar 10, 2006
181
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
182 /* revision.c */
cdcefbc @torvalds Add "--early-output" log flag for interactive GUI use
torvalds authored Nov 3, 2007
183 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 revi…
Brandon Casey authored Aug 20, 2008
184 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 Mar 10, 2006
185
32962c9 @gitster revision: introduce setup_revision_opt
gitster authored Mar 8, 2010
186 struct setup_revision_opt {
187 const char *def;
b449005 @gitster show -c: show patch text
gitster authored Mar 8, 2010
188 void (*tweak)(struct rev_info *, struct setup_revision_opt *);
9ef6aeb setup_revisions(): Allow walking history in a submodule
Heiko Voigt authored Jul 7, 2010
189 const char *submodule;
6d5b93f @drizzd cherry-pick: do not expect file arguments
drizzd authored Apr 14, 2012
190 int assume_dashdash;
d5f6b1d @gitster revision.c: the "log" family, except for "show", takes committish
gitster authored Jul 2, 2012
191 unsigned revarg_opt;
32962c9 @gitster revision: introduce setup_revision_opt
gitster authored Mar 9, 2010
192 };
193
db6296a Call setup_git_directory() early
Linus Torvalds authored Jul 28, 2006
194 extern void init_revisions(struct rev_info *revs, const char *prefix);
32962c9 @gitster revision: introduce setup_revision_opt
gitster authored Mar 9, 2010
195 extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *);
6b61ec0 revisions: refactor handle_revision_opt into parse_revision_opt.
Pierre Habouzit authored Jul 9, 2008
196 extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
197 const struct option *options,
198 const char * const usagestr[]);
8e676e8 @gitster revision.c: allow handle_revision_arg() to take other flags
gitster authored Jul 2, 2012
199 #define REVARG_CANNOT_BE_FILENAME 01
d5f6b1d @gitster revision.c: the "log" family, except for "show", takes committish
gitster authored Jul 2, 2012
200 #define REVARG_COMMITTISH 02
8e676e8 @gitster revision.c: allow handle_revision_arg() to take other flags
gitster authored Jul 2, 2012
201 extern int handle_revision_arg(const char *arg, struct rev_info *revs, int flags, unsigned revarg_opt);
5d6f093 revision.c: allow injecting revision parameters after setup_revisions().
Junio C Hamano authored Sep 5, 2006
202
bcc0a3e Teach revision walking machinery to walk multiple times sequencially
Heiko Voigt authored Mar 29, 2012
203 extern void reset_revision_walk(void);
cc0e6c5 @raalkml Handle return code of parse_commit in revision machinery
raalkml authored May 4, 2007
204 extern int prepare_revision_walk(struct rev_info *revs);
a4a88b2 git-rev-list libification: rev-list walking
Linus Torvalds authored Feb 28, 2006
205 extern struct commit *get_revision(struct rev_info *revs);
1df2d65 @mjg rev-list/log: factor out revision mark generation
mjg authored Mar 7, 2011
206 extern char *get_revision_mark(const struct rev_info *revs, const struct commit *commit);
b1b4755 @mjg git-log: put space after commit mark
mjg authored Mar 10, 2011
207 extern void put_revision_mark(const struct rev_info *revs, const struct commit *commit);
a4a88b2 git-rev-list libification: rev-list walking
Linus Torvalds authored Feb 28, 2006
208
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
209 extern void mark_parents_uninteresting(struct commit *commit);
210 extern void mark_tree_uninteresting(struct tree *tree);
211
212 struct name_path {
213 struct name_path *up;
214 int elem_len;
215 const char *elem;
216 };
217
cf2ab91 @torvalds show_object(): push path_name() call further down
torvalds authored Apr 10, 2009
218 char *path_name(const struct name_path *path, const char *name);
8d2dfc4 @torvalds process_{tree,blob}: show objects without buffering
torvalds authored Apr 10, 2009
219
91f1751 @gitster revision.c: add show_object_with_name() helper function
gitster authored Aug 17, 2011
220 extern void show_object_with_name(FILE *, struct object *, const struct name_path *, const char *);
221
1f1e895 Add "named object array" concept
Linus Torvalds authored Jun 20, 2006
222 extern void add_object(struct object *obj,
223 struct object_array *p,
224 struct name_path *path,
225 const char *name);
226
227 extern void add_pending_object(struct rev_info *revs, struct object *obj, const char *name);
26c3177 revision: factor out add_pending_sha1
René Scharfe authored Oct 1, 2011
228 extern void add_pending_sha1(struct rev_info *revs, const char *name, const unsigned char *sha1, unsigned int flags);
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
229
3384a2d @gitster shortlog: default to HEAD when the standard input is a tty
gitster authored Dec 11, 2007
230 extern void add_head_to_pending(struct rev_info *);
231
252a7c0 @torvalds Enhance --early-output format
torvalds authored Nov 4, 2007
232 enum commit_action {
233 commit_ignore,
234 commit_show,
235 commit_error
236 };
237
beb5af4 graph API: fix bug in graph_is_interesting()
Adam Simpkins authored Aug 18, 2009
238 extern enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit);
252a7c0 @torvalds Enhance --early-output format
torvalds authored Nov 4, 2007
239 extern enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit);
240
ae56354 First cut at libifying revlist generation
Linus Torvalds authored Feb 26, 2006
241 #endif
Something went wrong with that request. Please try again.