aboutsummaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-03-14 01:17:04 +0100
committerJunio C Hamano <junkio@cox.net>2007-03-14 16:21:19 -0700
commit41bbf9d58575095234c64df979ee884334469758 (patch)
tree916fb0b719369166e3cea928ec4831482ad4e9fa /diff.h
parent803527f1d9b284fa848d4a4bad23158c162a5d54 (diff)
downloadgit-41bbf9d58575095234c64df979ee884334469758.tar.gz
git-41bbf9d58575095234c64df979ee884334469758.tar.xz
Allow git-diff exit with codes similar to diff(1)
This introduces a new command-line option: --exit-code. The diff programs will return 1 for differences, return 0 for equality, and something else for errors. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/diff.h b/diff.h
index 4b435e8b1..d13fc8976 100644
--- a/diff.h
+++ b/diff.h
@@ -56,7 +56,8 @@ struct diff_options {
silent_on_remove:1,
find_copies_harder:1,
color_diff:1,
- color_diff_words:1;
+ color_diff_words:1,
+ exit_with_status:1;
int context;
int break_opt;
int detect_rename;
@@ -71,6 +72,8 @@ struct diff_options {
const char *msg_sep;
const char *stat_sep;
long xdl_opts;
+ /* 0 - no differences; only meaningful if exit_with_status set */
+ int has_changes;
int stat_width;
int stat_name_width;