author | Junio C Hamano <gitster@pobox.com> | |
Fri, 14 Dec 2007 07:40:27 +0000 (23:40 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 14 Dec 2007 07:40:27 +0000 (23:40 -0800) | ||
commit | da31b358fb39b32622c14343ffe157a765f3948b | |
tree | f995bc40d7685b5d342e9d60a99a4152a55cf2cd | tree | snapshot |
parent | 62c64895cfcf3bbf34969a69fa96a631f7d5b14e | commit | diff |
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>
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>
builtin-diff-files.c | diff | blob | history | |
builtin-diff-index.c | diff | blob | history | |
builtin-diff-tree.c | diff | blob | history | |
builtin-diff.c | diff | blob | history | |
diff.c | diff | blob | history | |
diff.h | diff | blob | history | |
t/t4015-diff-whitespace.sh | diff | blob | history |