summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 1be4ca4e4a..6febe7e365 100644
--- a/diff.h
+++ b/diff.h
@@ -370,6 +370,22 @@ void diff_emit_submodule_error(struct diff_options *o, const char *err);
void diff_emit_submodule_pipethrough(struct diff_options *o,
const char *line, int len);
+struct diffstat_t {
+ int nr;
+ int alloc;
+ struct diffstat_file {
+ char *from_name;
+ char *name;
+ char *print_name;
+ const char *comments;
+ unsigned is_unmerged:1;
+ unsigned is_binary:1;
+ unsigned is_renamed:1;
+ unsigned is_interesting:1;
+ uintmax_t added, deleted;
+ } **files;
+};
+
enum color_diff {
DIFF_RESET = 0,
DIFF_CONTEXT = 1,
@@ -460,6 +476,10 @@ void diff_change(struct diff_options *,
struct diff_filepair *diff_unmerge(struct diff_options *, const char *path);
+void compute_diffstat(struct diff_options *options, struct diffstat_t *diffstat,
+ struct diff_queue_struct *q);
+void free_diffstat_info(struct diffstat_t *diffstat);
+
#define DIFF_SETUP_REVERSE 1
#define DIFF_SETUP_USE_SIZE_CACHE 4