summaryrefslogtreecommitdiff
path: root/builtin-diff-files.c
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2007-11-10 20:05:14 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-11 16:54:15 -0800
commit8f67f8aefb1b751073f8b36fae8be8f72eb93f4a (patch)
tree5458e87f98485937b0b5b747158ce8bfc2bcda06 /builtin-diff-files.c
parent68dce6e941af73be34bccfe2be335b7887955ee5 (diff)
downloadgit-8f67f8aefb1b751073f8b36fae8be8f72eb93f4a.tar.gz
Make the diff_options bitfields be an unsigned with explicit masks.
reverse_diff was a bit-value in disguise, it's merged in the flags now. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-diff-files.c')
-rw-r--r--builtin-diff-files.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-diff-files.c b/builtin-diff-files.c
index 6cb30c8e12..046b7e34b5 100644
--- a/builtin-diff-files.c
+++ b/builtin-diff-files.c
@@ -31,5 +31,7 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
if (!rev.diffopt.output_format)
rev.diffopt.output_format = DIFF_FORMAT_RAW;
result = run_diff_files_cmd(&rev, argc, argv);
- return rev.diffopt.exit_with_status ? rev.diffopt.has_changes: result;
+ if (DIFF_OPT_TST(&rev.diffopt, EXIT_WITH_STATUS))
+ return DIFF_OPT_TST(&rev.diffopt, HAS_CHANGES) != 0;
+ return result;
}