Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 341 lines (285 sloc) 11.268 kB
be3cfa8 [PATCH] Diff-tree-helper take two.
Junio C Hamano authored
1 /*
2 * Copyright (C) 2005 Junio C Hamano
3 */
86436c2 [PATCH] Split external diff command interface to a separate file.
Junio C Hamano authored
4 #ifndef DIFF_H
5 #define DIFF_H
6
1b0c717 tree/diff header cleanup.
Junio C Hamano authored
7 #include "tree-walk.h"
50f9a85 Make the "struct tree_desc" operations available to others
Linus Torvalds authored
8
9153983 Log message printout cleanups
Linus Torvalds authored
9 struct rev_info;
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
10 struct diff_options;
0424558 @peff diff: support custom callbacks for output
peff authored
11 struct diff_queue_struct;
a3c158d @byang Add a prefix output callback to diff output
byang authored
12 struct strbuf;
a788d7d textconv: make the API public
Axel Bonnet authored
13 struct diff_filespec;
14 struct userdiff_driver;
0041f09 use struct sha1_array in diff_tree_combined()
René Scharfe authored
15 struct sha1_array;
8288929 pass struct commit to diff_tree_combined_merge()
René Scharfe authored
16 struct commit;
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
17
18 typedef void (*change_fn_t)(struct diff_options *options,
19 unsigned old_mode, unsigned new_mode,
20 const unsigned char *old_sha1,
21 const unsigned char *new_sha1,
e545010 @peff diff: do not use null sha1 as a sentinel value
peff authored
22 int old_sha1_valid, int new_sha1_valid,
e3d42c4 @jlehmann Performance optimization for detection of modified submodules
jlehmann authored
23 const char *fullpath,
24 unsigned old_dirty_submodule, unsigned new_dirty_submodule);
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
25
26 typedef void (*add_remove_fn_t)(struct diff_options *options,
27 int addremove, unsigned mode,
28 const unsigned char *sha1,
e545010 @peff diff: do not use null sha1 as a sentinel value
peff authored
29 int sha1_valid,
e3d42c4 @jlehmann Performance optimization for detection of modified submodules
jlehmann authored
30 const char *fullpath, unsigned dirty_submodule);
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
31
0424558 @peff diff: support custom callbacks for output
peff authored
32 typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
33 struct diff_options *options, void *data);
34
a3c158d @byang Add a prefix output callback to diff output
byang authored
35 typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data);
36
c674434 @tihirvon Merge with_raw, with_stat and summary variables to output_format
tihirvon authored
37 #define DIFF_FORMAT_RAW 0x0001
38 #define DIFF_FORMAT_DIFFSTAT 0x0002
74e2abe diff --numstat
Junio C Hamano authored
39 #define DIFF_FORMAT_NUMSTAT 0x0004
40 #define DIFF_FORMAT_SUMMARY 0x0008
41 #define DIFF_FORMAT_PATCH 0x0010
ebd124c make commit message a little more consistent and conforting
Nicolas Pitre authored
42 #define DIFF_FORMAT_SHORTSTAT 0x0020
7df7c01 @torvalds Add "--dirstat" for some directory statistics
torvalds authored
43 #define DIFF_FORMAT_DIRSTAT 0x0040
c674434 @tihirvon Merge with_raw, with_stat and summary variables to output_format
tihirvon authored
44
45 /* These override all above */
74e2abe diff --numstat
Junio C Hamano authored
46 #define DIFF_FORMAT_NAME 0x0100
47 #define DIFF_FORMAT_NAME_STATUS 0x0200
48 #define DIFF_FORMAT_CHECKDIFF 0x0400
c674434 @tihirvon Merge with_raw, with_stat and summary variables to output_format
tihirvon authored
49
50 /* Same as output_format = 0 but we know that -s flag was given
51 * and we should not give default value to output_format.
52 */
74e2abe diff --numstat
Junio C Hamano authored
53 #define DIFF_FORMAT_NO_OUTPUT 0x0800
c674434 @tihirvon Merge with_raw, with_stat and summary variables to output_format
tihirvon authored
54
74e2abe diff --numstat
Junio C Hamano authored
55 #define DIFF_FORMAT_CALLBACK 0x1000
0424558 @peff diff: support custom callbacks for output
peff authored
56
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
57 #define DIFF_OPT_RECURSIVE (1 << 0)
58 #define DIFF_OPT_TREE_IN_RECURSIVE (1 << 1)
59 #define DIFF_OPT_BINARY (1 << 2)
60 #define DIFF_OPT_TEXT (1 << 3)
61 #define DIFF_OPT_FULL_INDEX (1 << 4)
62 #define DIFF_OPT_SILENT_ON_REMOVE (1 << 5)
63 #define DIFF_OPT_FIND_COPIES_HARDER (1 << 6)
64 #define DIFF_OPT_FOLLOW_RENAMES (1 << 7)
90d43b0 @peff teach diffcore-rename to optionally ignore empty content
peff authored
65 #define DIFF_OPT_RENAME_EMPTY (1 << 8)
882749a @trast diff: add --word-diff option that generalizes --color-words
trast authored
66 /* (1 << 9) unused */
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
67 #define DIFF_OPT_HAS_CHANGES (1 << 10)
90b1994 @gitster diff: Rename QUIET internal option to QUICK
gitster authored
68 #define DIFF_OPT_QUICK (1 << 11)
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
69 #define DIFF_OPT_NO_INDEX (1 << 12)
70 #define DIFF_OPT_ALLOW_EXTERNAL (1 << 13)
71 #define DIFF_OPT_EXIT_WITH_STATUS (1 << 14)
72 #define DIFF_OPT_REVERSE_DIFF (1 << 15)
62c6489 @wincent "diff --check" should affect exit status
wincent authored
73 #define DIFF_OPT_CHECK_FAILED (1 << 16)
cd676a5 @gitster diff --relative: output paths as relative to the current subdirectory
gitster authored
74 #define DIFF_OPT_RELATIVE_NAME (1 << 17)
50fd9bd @dscho diff options: Introduce --ignore-submodules
dscho authored
75 #define DIFF_OPT_IGNORE_SUBMODULES (1 << 18)
f88d225 @gitster diff --cumulative is a sub-option of --dirstat
gitster authored
76 #define DIFF_OPT_DIRSTAT_CUMULATIVE (1 << 19)
fd33777 @heikkiorsila diff --dirstat-by-file: count changed files, not lines
heikkiorsila authored
77 #define DIFF_OPT_DIRSTAT_BY_FILE (1 << 20)
c7534ef @peff userdiff: require explicitly allowing textconv
peff authored
78 #define DIFF_OPT_ALLOW_TEXTCONV (1 << 21)
f245194 @gitster diff: change semantics of "ignore whitespace" options
gitster authored
79 #define DIFF_OPT_DIFF_FROM_CONTENTS (1 << 22)
752c0c2 @dscho Add the --submodule option to the diff option family
dscho authored
80 #define DIFF_OPT_SUBMODULE_LOG (1 << 23)
9297f77 @jlehmann git status: Show detailed dirty status of submodules in long format
jlehmann authored
81 #define DIFF_OPT_DIRTY_SUBMODULES (1 << 24)
3bfc450 @jlehmann git status: ignoring untracked files must apply to submodules too
jlehmann authored
82 #define DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES (1 << 25)
4af574d @gitster Merge branch 'ab/blame-textconv'
gitster authored
83 #define DIFF_OPT_IGNORE_DIRTY_SUBMODULES (1 << 26)
aee9c7d @jlehmann Submodules: Add the new "ignore" config option for diff and status
jlehmann authored
84 #define DIFF_OPT_OVERRIDE_SUBMODULE_CONFIG (1 << 27)
1c57a62 @jherland New --dirstat=lines mode, doing dirstat analysis based on diffstat
jherland authored
85 #define DIFF_OPT_DIRSTAT_BY_LINE (1 << 28)
14937c2 diff: add option to show whole functions as context
René Scharfe authored
86 #define DIFF_OPT_FUNCCONTEXT (1 << 29)
accccde @gitster pickaxe: allow -i to search in patch case-insensitively
gitster authored
87 #define DIFF_OPT_PICKAXE_IGNORE_CASE (1 << 30)
752c0c2 @dscho Add the --submodule option to the diff option family
dscho authored
88
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
89 #define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag)
90 #define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag)
91 #define DIFF_OPT_CLR(opts, flag) ((opts)->flags &= ~DIFF_OPT_##flag)
628d5c2 Use DIFF_XDL_SET/DIFF_OPT_SET instead of raw bit-masking
Keith Cascio authored
92 #define DIFF_XDL_TST(opts, flag) ((opts)->xdl_opts & XDF_##flag)
93 #define DIFF_XDL_SET(opts, flag) ((opts)->xdl_opts |= XDF_##flag)
94 #define DIFF_XDL_CLR(opts, flag) ((opts)->xdl_opts &= ~XDF_##flag)
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
95
307ab20 @gitster xdiff: PATIENCE/HISTOGRAM are not independent option bits
gitster authored
96 #define DIFF_WITH_ALG(opts, flag) (((opts)->xdl_opts & ~XDF_DIFF_ALGORITHM_MASK) | XDF_##flag)
97
882749a @trast diff: add --word-diff option that generalizes --color-words
trast authored
98 enum diff_words_type {
99 DIFF_WORDS_NONE = 0,
100 DIFF_WORDS_PORCELAIN,
101 DIFF_WORDS_PLAIN,
102 DIFF_WORDS_COLOR
103 };
104
6b5ee13 Diff clean-up.
Junio C Hamano authored
105 struct diff_options {
106 const char *filter;
107 const char *orderfile;
108 const char *pickaxe;
2f3f8b2 git-pickaxe: rename detection optimization
Junio C Hamano authored
109 const char *single_follow;
eab9a40 @dscho Teach diff machinery to display other prefixes than "a/" and "b/"
dscho authored
110 const char *a_prefix, *b_prefix;
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
111 unsigned flags;
f1c9626 @peff diff: refactor COLOR_DIFF from a flag into an int
peff authored
112 int use_color;
ee1e541 git diff: support "-U" and "--unified" options properly
Linus Torvalds authored
113 int context;
6d0e674 diff: add option to show context between close hunks
René Scharfe authored
114 int interhunkcontext;
6b5ee13 Diff clean-up.
Junio C Hamano authored
115 int break_opt;
116 int detect_rename;
467ddc1 @gitster git diff -D: omit the preimage of deletes
gitster authored
117 int irreversible_delete;
fb13227 @gitster git-diff: squelch "empty" diffs
gitster authored
118 int skip_stat_unmatch;
6b5ee13 Diff clean-up.
Junio C Hamano authored
119 int line_termination;
120 int output_format;
121 int pickaxe_opts;
122 int rename_score;
8082d8d Diff: -l<num> to limit rename/copy detection.
Junio C Hamano authored
123 int rename_limit;
bf0ab10 @peff merge: improve inexact rename limit warning
peff authored
124 int needed_rename_limit;
f31027c @gitster diffcore-rename: fall back to -C when -C -C busts the rename limit
gitster authored
125 int degraded_cc_to_c;
3ac942d @peff add inexact rename detection progress infrastructure
peff authored
126 int show_rename_progress;
712d2c7 @jherland Allow specifying --dirstat cut-off percentage as a floating point number
jherland authored
127 int dirstat_permille;
6b5ee13 Diff clean-up.
Junio C Hamano authored
128 int setup;
47dd0d5 diff: --abbrev option
Junio C Hamano authored
129 int abbrev;
cd676a5 @gitster diff --relative: output paths as relative to the current subdirectory
gitster authored
130 const char *prefix;
131 int prefix_length;
698ce6f @dscho fmt-patch: Support --attach
dscho authored
132 const char *stat_sep;
0d21efa @dscho Teach diff about -b and -w flags
dscho authored
133 long xdl_opts;
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
134
a254002 diff --stat: allow custom diffstat output width.
Junio C Hamano authored
135 int stat_width;
136 int stat_name_width;
969fe57 @keszybz diff --stat: enable limiting of the graph part
keszybz authored
137 int stat_graph_width;
808e1db @mjg diff: introduce --stat-lines to limit the stat lines
mjg authored
138 int stat_count;
2b6a541 @dscho color-words: take an optional regular expression describing words
dscho authored
139 const char *word_regex;
882749a @trast diff: add --word-diff option that generalizes --color-words
trast authored
140 enum diff_words_type word_diff;
a254002 diff --stat: allow custom diffstat output width.
Junio C Hamano authored
141
34a5e1a @dscho diff --no-index: also imitate the exit status of diff(1)
dscho authored
142 /* this is set by diffcore for DIFF_FORMAT_PATCH */
143 int found_changes;
144
44c48a9 @gitster diff --follow: do call diffcore_std() as necessary
gitster authored
145 /* to support internal diff recursion by --follow hack*/
146 int found_follow;
147
c0c7773 Write diff output to a file in struct diff_options
Daniel Barkalow authored
148 FILE *file;
149 int close_file;
150
66f1362 @pclouds Convert struct diff_options to use struct pathspec
pclouds authored
151 struct pathspec pathspec;
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
152 change_fn_t change;
153 add_remove_fn_t add_remove;
0424558 @peff diff: support custom callbacks for output
peff authored
154 diff_format_fn_t format_callback;
155 void *format_callback_data;
a3c158d @byang Add a prefix output callback to diff output
byang authored
156 diff_prefix_fn_t output_prefix;
5e71a84 @lucianposton Add output_prefix_length to diff_options
lucianposton authored
157 int output_prefix_length;
a3c158d @byang Add a prefix output callback to diff output
byang authored
158 void *output_prefix_data;
6b5ee13 Diff clean-up.
Junio C Hamano authored
159 };
160
ce43697 @peff Colorize 'commit' lines in log ui
peff authored
161 enum color_diff {
162 DIFF_RESET = 0,
163 DIFF_PLAIN = 1,
164 DIFF_METAINFO = 2,
165 DIFF_FRAGINFO = 3,
166 DIFF_FILE_OLD = 4,
167 DIFF_FILE_NEW = 5,
168 DIFF_COMMIT = 6,
448c3ef diff.c: second war on whitespace.
Junio C Hamano authored
169 DIFF_WHITESPACE = 7,
4b05548 enums: omit trailing comma for portability
Gary V. Vaughan authored
170 DIFF_FUNCINFO = 8
ce43697 @peff Colorize 'commit' lines in log ui
peff authored
171 };
172 const char *diff_get_color(int diff_use_color, enum color_diff ix);
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
173 #define diff_get_color_opt(o, ix) \
f1c9626 @peff diff: refactor COLOR_DIFF from a flag into an int
peff authored
174 diff_get_color((o)->use_color, ix)
8f67f8a @MadCoder Make the diff_options bitfields be an unsigned with explicit masks.
MadCoder authored
175
ce43697 @peff Colorize 'commit' lines in log ui
peff authored
176
698ce6f @dscho fmt-patch: Support --attach
dscho authored
177 extern const char mime_boundary_leader[];
178
a8baa7b tree-diff: do not assume we use only one pathspec
Junio C Hamano authored
179 extern void diff_tree_setup_paths(const char **paths, struct diff_options *);
180 extern void diff_tree_release_paths(struct diff_options *);
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
181 extern int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
182 const char *base, struct diff_options *opt);
183 extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new,
184 const char *base, struct diff_options *opt);
2b60356 Make git-cherry handle root trees
Rene Scharfe authored
185 extern int diff_root_tree_sha1(const unsigned char *new, const char *base,
186 struct diff_options *opt);
ac1b3d1 Split up tree diff functions into tree-diff.c library
Linus Torvalds authored
187
ea726d0 diff-files: -c and --cc options.
Junio C Hamano authored
188 struct combine_diff_path {
189 struct combine_diff_path *next;
190 int len;
191 char *path;
2454c96 combine-diff: show mode changes as well.
Junio C Hamano authored
192 unsigned int mode;
ea726d0 diff-files: -c and --cc options.
Junio C Hamano authored
193 unsigned char sha1[20];
2454c96 combine-diff: show mode changes as well.
Junio C Hamano authored
194 struct combine_diff_parent {
d416df8 combine-diff: Record diff status a bit more faithfully
Junio C Hamano authored
195 char status;
2454c96 combine-diff: show mode changes as well.
Junio C Hamano authored
196 unsigned int mode;
197 unsigned char sha1[20];
198 } parent[FLEX_ARRAY];
ea726d0 diff-files: -c and --cc options.
Junio C Hamano authored
199 };
2454c96 combine-diff: show mode changes as well.
Junio C Hamano authored
200 #define combine_diff_path_size(n, l) \
201 (sizeof(struct combine_diff_path) + \
202 sizeof(struct combine_diff_parent) * (n) + (l) + 1)
ea726d0 diff-files: -c and --cc options.
Junio C Hamano authored
203
9153983 Log message printout cleanups
Linus Torvalds authored
204 extern void show_combined_diff(struct combine_diff_path *elem, int num_parent,
205 int dense, struct rev_info *);
ea726d0 diff-files: -c and --cc options.
Junio C Hamano authored
206
0041f09 use struct sha1_array in diff_tree_combined()
René Scharfe authored
207 extern void diff_tree_combined(const unsigned char *sha1, const struct sha1_array *parents, int dense, struct rev_info *rev);
0fe7c1d built-in diff: assorted updates.
Junio C Hamano authored
208
8288929 pass struct commit to diff_tree_combined_merge()
René Scharfe authored
209 extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev);
af3feef diff-tree -c: show a merge commit a bit more sensibly.
Junio C Hamano authored
210
a5a818e @gitster diff: vary default prefix depending on what are compared
gitster authored
211 void diff_set_mnemonic_prefix(struct diff_options *options, const char *a, const char *b);
212
28b9264 @gitster diff: futureproof "stop feeding the backend early" logic
gitster authored
213 extern int diff_can_quit_early(struct diff_options *);
214
6b5ee13 Diff clean-up.
Junio C Hamano authored
215 extern void diff_addremove(struct diff_options *,
216 int addremove,
77eb272 [PATCH] Reworked external diff interface.
Junio C Hamano authored
217 unsigned mode,
218 const unsigned char *sha1,
e545010 @peff diff: do not use null sha1 as a sentinel value
peff authored
219 int sha1_valid,
e3d42c4 @jlehmann Performance optimization for detection of modified submodules
jlehmann authored
220 const char *fullpath, unsigned dirty_submodule);
77eb272 [PATCH] Reworked external diff interface.
Junio C Hamano authored
221
6b5ee13 Diff clean-up.
Junio C Hamano authored
222 extern void diff_change(struct diff_options *,
223 unsigned mode1, unsigned mode2,
224 const unsigned char *sha1,
225 const unsigned char *sha2,
e545010 @peff diff: do not use null sha1 as a sentinel value
peff authored
226 int sha1_valid,
227 int sha2_valid,
e3d42c4 @jlehmann Performance optimization for detection of modified submodules
jlehmann authored
228 const char *fullpath,
229 unsigned dirty_submodule1, unsigned dirty_submodule2);
77eb272 [PATCH] Reworked external diff interface.
Junio C Hamano authored
230
fa7b290 @gitster diff: remove often unused parameters from diff_unmerge()
gitster authored
231 extern struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);
77eb272 [PATCH] Reworked external diff interface.
Junio C Hamano authored
232
19feebc [PATCH] Clean up diff_setup() to make it more extensible.
Junio C Hamano authored
233 #define DIFF_SETUP_REVERSE 1
f0c6b2a [PATCH] Optimize diff-tree -[CM] --stdin
Junio C Hamano authored
234 #define DIFF_SETUP_USE_CACHE 2
235 #define DIFF_SETUP_USE_SIZE_CACHE 4
ce24067 [PATCH] diff: Fix docs and add -O to diff-helper.
Junio C Hamano authored
236
dea007f @moy diff: parse separate options like -S foo
moy authored
237 /*
238 * Poor man's alternative to parse-option, to allow both sticked form
239 * (--option=value) and separate form (--option value).
240 */
241 extern int parse_long_opt(const char *opt, const char **argv,
242 const char **optarg);
243
ef90d6d @dscho Provide git_config with a callback-data parameter
dscho authored
244 extern int git_diff_basic_config(const char *var, const char *value, void *cb);
245 extern int git_diff_ui_config(const char *var, const char *value, void *cb);
6b2f2d9 @matthiask Add color.ui variable which globally enables colorization if set
matthiask authored
246 extern int diff_use_color_default;
6b5ee13 Diff clean-up.
Junio C Hamano authored
247 extern void diff_setup(struct diff_options *);
248 extern int diff_opt_parse(struct diff_options *, const char **, int);
2845265 @trast diff_setup_done(): return void
trast authored
249 extern void diff_setup_done(struct diff_options *);
86436c2 [PATCH] Split external diff command interface to a separate file.
Junio C Hamano authored
250
6b14d7f [PATCH] Diffcore updates.
Junio C Hamano authored
251 #define DIFF_DETECT_RENAME 1
252 #define DIFF_DETECT_COPY 2
253
367cec1 [PATCH] Add --pickaxe-all to diff-* brothers.
Junio C Hamano authored
254 #define DIFF_PICKAXE_ALL 1
d01d8c6 Support for pickaxe matching regular expressions
Petr Baudis authored
255 #define DIFF_PICKAXE_REGEX 2
f345b0a [PATCH] Add -B flag to diff-* brothers.
Junio C Hamano authored
256
f506b8e @gitster git log/diff: add -G<regexp> that greps in the patch text
gitster authored
257 #define DIFF_PICKAXE_KIND_S 4 /* traditional plumbing counter */
258 #define DIFF_PICKAXE_KIND_G 8 /* grep in the patch */
259
6b5ee13 Diff clean-up.
Junio C Hamano authored
260 extern void diffcore_std(struct diff_options *);
730f728 @gitster unpack-trees.c: look ahead in the index
gitster authored
261 extern void diffcore_fix_diff_index(struct diff_options *);
f2ce9fd [PATCH] Add --diff-filter= output restriction to diff-* family.
Junio C Hamano authored
262
dda2d79 [PATCH] Clean up diff option descriptions.
Junio C Hamano authored
263 #define COMMON_DIFF_OPTIONS_HELP \
264 "\ncommon diff options:\n" \
8082d8d Diff: -l<num> to limit rename/copy detection.
Junio C Hamano authored
265 " -z output diff-raw with lines terminated with NUL.\n" \
266 " -p output patch format.\n" \
267 " -u synonym for -p.\n" \
5c91da2 Document --patch-with-raw
Petr Baudis authored
268 " --patch-with-raw\n" \
269 " output both a patch and the diff-raw format.\n" \
d75f795 @dscho diff-options: add --stat (take 2)
dscho authored
270 " --stat show diffstat instead of patch.\n" \
74e2abe diff --numstat
Junio C Hamano authored
271 " --numstat show numeric diffstat instead of patch.\n" \
2935327 @dscho diff-options: add --patch-with-stat
dscho authored
272 " --patch-with-stat\n" \
273 " output a patch and prepend its diffstat.\n" \
8082d8d Diff: -l<num> to limit rename/copy detection.
Junio C Hamano authored
274 " --name-only show only names of changed files.\n" \
946f5f7 Diff: --name-status output format.
Junio C Hamano authored
275 " --name-status show names and status of changed files.\n" \
47dd0d5 diff: --abbrev option
Junio C Hamano authored
276 " --full-index show full object name on index lines.\n" \
913419f diff --abbrev: document --abbrev=<n> form.
Junio C Hamano authored
277 " --abbrev=<n> abbreviate object names in diff-tree header and diff-raw.\n" \
8082d8d Diff: -l<num> to limit rename/copy detection.
Junio C Hamano authored
278 " -R swap input file pairs.\n" \
279 " -B detect complete rewrites.\n" \
280 " -M detect renames.\n" \
281 " -C detect copies.\n" \
dda2d79 [PATCH] Clean up diff option descriptions.
Junio C Hamano authored
282 " --find-copies-harder\n" \
8082d8d Diff: -l<num> to limit rename/copy detection.
Junio C Hamano authored
283 " try unchanged files as candidate for copy detection.\n" \
284 " -l<n> limit rename attempts up to <n> paths.\n" \
285 " -O<file> reorder diffs according to the <file>.\n" \
286 " -S<string> find filepair whose only one side contains the string.\n" \
dda2d79 [PATCH] Clean up diff option descriptions.
Junio C Hamano authored
287 " --pickaxe-all\n" \
ca49920 Add -a and --text to common diff options help
Stephan Feder authored
288 " show all files diff when -S is used and hit is found.\n" \
289 " -a --text treat all files as text.\n"
dda2d79 [PATCH] Clean up diff option descriptions.
Junio C Hamano authored
290
38c6f78 [PATCH] Prepare diffcore interface for diff-tree header supression.
Junio C Hamano authored
291 extern int diff_queue_is_empty(void);
6b5ee13 Diff clean-up.
Junio C Hamano authored
292 extern void diff_flush(struct diff_options*);
f31027c @gitster diffcore-rename: fall back to -C when -C -C busts the rename limit
gitster authored
293 extern void diff_warn_rename_limit(const char *varname, int needed, int degraded_cc);
86436c2 [PATCH] Split external diff command interface to a separate file.
Junio C Hamano authored
294
e7baa4f Use symbolic constants for diff-raw status indicators.
Junio C Hamano authored
295 /* diff-raw status letters */
ca8c915 diff-raw: Use 'A' instead of 'N' for added files.
Junio C Hamano authored
296 #define DIFF_STATUS_ADDED 'A'
e7baa4f Use symbolic constants for diff-raw status indicators.
Junio C Hamano authored
297 #define DIFF_STATUS_COPIED 'C'
298 #define DIFF_STATUS_DELETED 'D'
299 #define DIFF_STATUS_MODIFIED 'M'
300 #define DIFF_STATUS_RENAMED 'R'
301 #define DIFF_STATUS_TYPE_CHANGED 'T'
302 #define DIFF_STATUS_UNKNOWN 'X'
303 #define DIFF_STATUS_UNMERGED 'U'
304
305 /* these are not diff-raw status letters proper, but used by
306 * diffcore-filter insn to specify additional restrictions.
307 */
0b34379 Fix diff-filter All-Or-None mark.
Junio C Hamano authored
308 #define DIFF_STATUS_FILTER_AON '*'
e7baa4f Use symbolic constants for diff-raw status indicators.
Junio C Hamano authored
309 #define DIFF_STATUS_FILTER_BROKEN 'B'
310
47dd0d5 diff: --abbrev option
Junio C Hamano authored
311 extern const char *diff_unique_abbrev(const unsigned char *, int);
312
4bd5b7d @gitster ce_match_stat, run_diff_files: use symbolic constants for readability
gitster authored
313 /* do not report anything on removed paths */
314 #define DIFF_SILENT_ON_REMOVED 01
fb63d7f @gitster git-add: make the entry stat-clean after re-adding the same contents
gitster authored
315 /* report racily-clean paths as modified */
316 #define DIFF_RACY_IS_MODIFIED 02
4bd5b7d @gitster ce_match_stat, run_diff_files: use symbolic constants for readability
gitster authored
317 extern int run_diff_files(struct rev_info *revs, unsigned int option);
5c21ac0 Libified diff-index: backward compatibility fix.
Junio C Hamano authored
318 extern int run_diff_index(struct rev_info *revs, int cached);
e09ad6e Libify diff-index.
Junio C Hamano authored
319
1cfe773 git-blame: no rev means start from the working tree file.
Junio C Hamano authored
320 extern int do_diff_cache(const unsigned char *, struct diff_options *);
fcb3d0a @dscho add diff_flush_patch_id() to calculate the patch id
dscho authored
321 extern int diff_flush_patch_id(struct diff_options *, unsigned char *);
322
da31b35 @gitster diff --check: minor fixups
gitster authored
323 extern int diff_result_code(struct diff_options *, int);
324
0569e9b @gitster "git diff": do not ignore index without --no-index
gitster authored
325 extern void diff_no_index(struct rev_info *, int, const char **, int, const char *);
326
75f3ff2 @sbeyer Generalize and libify index_is_dirty() to index_differs_from(...)
sbeyer authored
327 extern int index_differs_from(const char *def, int diff_flags);
328
a788d7d textconv: make the API public
Axel Bonnet authored
329 extern size_t fill_textconv(struct userdiff_driver *driver,
330 struct diff_filespec *df,
331 char **outbuf);
332
333 extern struct userdiff_driver *get_textconv(struct diff_filespec *one);
334
10ae752 @kballard merge-recursive: option to specify rename threshold
kballard authored
335 extern int parse_rename_score(const char **cp_p);
336
7f81463 @pclouds Use correct grammar in diffstat summary line
pclouds authored
337 extern int print_stat_summary(FILE *fp, int files,
338 int insertions, int deletions);
339
86436c2 [PATCH] Split external diff command interface to a separate file.
Junio C Hamano authored
340 #endif /* DIFF_H */
Something went wrong with that request. Please try again.