diff options
author | Wincent Colaiuta <win@wincent.com> | 2007-12-13 21:24:52 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-13 23:05:42 -0800 |
commit | 62c64895cfcf3bbf34969a69fa96a631f7d5b14e (patch) | |
tree | ba4176915a9320356f245f401913d2bfa9992b43 /diff.h | |
parent | 913b45f51b151d8e29f86df67d3e10853d831470 (diff) | |
download | git-62c64895cfcf3bbf34969a69fa96a631f7d5b14e.tar.gz git-62c64895cfcf3bbf34969a69fa96a631f7d5b14e.tar.xz |
"diff --check" should affect exit status
"git diff" has a --check option that can be used to check for whitespace
problems but it only reported by printing warnings to the
console.
Now when the --check option is used we give a non-zero exit status,
making "git diff --check" nicer to use in scripts and hooks.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r-- | diff.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -59,6 +59,7 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q, #define DIFF_OPT_ALLOW_EXTERNAL (1 << 13) #define DIFF_OPT_EXIT_WITH_STATUS (1 << 14) #define DIFF_OPT_REVERSE_DIFF (1 << 15) +#define DIFF_OPT_CHECK_FAILED (1 << 16) #define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag) #define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag) #define DIFF_OPT_CLR(opts, flag) ((opts)->flags &= ~DIFF_OPT_##flag) |