summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/diff.h b/diff.h
index 62e5768a9a..2fa256c3ef 100644
--- a/diff.h
+++ b/diff.h
@@ -7,6 +7,7 @@
#include "hash.h"
#include "pathspec.h"
#include "strbuf.h"
+#include "color.h"
struct oidset;
@@ -126,6 +127,13 @@ struct diff_flags {
unsigned recursive;
unsigned tree_in_recursive;
+ /*
+ * Historically diff_tree_combined() overrides recursive to 1. To
+ * suppress this behavior, set the flag below.
+ * It has no effect if recursive is already set to 1.
+ */
+ unsigned no_recursive_diff_tree_combined;
+
/* Affects the way how a file that is seemingly binary is treated. */
unsigned binary;
unsigned text;
@@ -283,7 +291,7 @@ struct diff_options {
/* diff-filter bits */
unsigned int filter, filter_not;
- int use_color;
+ enum git_colorbool use_color;
/* Number of context lines to generate in patch output. */
int context;
@@ -400,10 +408,20 @@ struct diff_options {
#define COLOR_MOVED_WS_ERROR (1<<0)
unsigned color_moved_ws_handling;
+ bool dry_run;
+
struct repository *repo;
struct strmap *additional_path_headers;
int no_free;
+
+ /*
+ * The value '0' is a valid max-depth (for no recursion), and value '-1'
+ * also (for unlimited recursion), so the extra "valid" flag is used to
+ * determined whether the user specified option --max-depth.
+ */
+ int max_depth;
+ int max_depth_valid;
};
unsigned diff_filter_bit(char status);
@@ -459,7 +477,7 @@ enum color_diff {
DIFF_FILE_NEW_BOLD = 22,
};
-const char *diff_get_color(int diff_use_color, enum color_diff ix);
+const char *diff_get_color(enum git_colorbool diff_use_color, enum color_diff ix);
#define diff_get_color_opt(o, ix) \
diff_get_color((o)->use_color, ix)