aboutsummaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-13 23:40:27 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-13 23:40:27 -0800
commitda31b358fb39b32622c14343ffe157a765f3948b (patch)
treef995bc40d7685b5d342e9d60a99a4152a55cf2cd /diff.h
parent62c64895cfcf3bbf34969a69fa96a631f7d5b14e (diff)
downloadgit-da31b358fb39b32622c14343ffe157a765f3948b.tar.gz
git-da31b358fb39b32622c14343ffe157a765f3948b.tar.xz
diff --check: minor fixups
There is no reason --exit-code and --check-diff must be mutually exclusive, so assign different bits to different results and allow them to be returned from the command. Introduce diff_result_code() to factor out the common code to decide final status code based on diffopt settings and use it everywhere. Update tests to match the above fix. Turning pager off when "diff --check" is used is a regression. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index 5d50d93a5..7e8000a5d 100644
--- a/diff.h
+++ b/diff.h
@@ -247,4 +247,6 @@ extern int run_diff_index(struct rev_info *revs, int cached);
extern int do_diff_cache(const unsigned char *, struct diff_options *);
extern int diff_flush_patch_id(struct diff_options *, unsigned char *);
+extern int diff_result_code(struct diff_options *, int);
+
#endif /* DIFF_H */