diff options
Diffstat (limited to 'diff.h')
| -rw-r--r-- | diff.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -7,6 +7,7 @@ #include "hash.h" #include "pathspec.h" #include "strbuf.h" +#include "color.h" struct oidset; @@ -283,7 +284,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 +401,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 +470,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) |
