aboutsummaryrefslogtreecommitdiffstats
path: root/diff-files.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-27 15:54:37 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-29 11:17:43 -0700
commit19feebc8c3ca7bd40f2f32f4f856b68b9a02870c (patch)
treee536ae939c90a8ce9c1278f6134ce5b6d1a72774 /diff-files.c
parent09d9d1a648ecff1dd914224b3ee616b0486ec525 (diff)
downloadgit-19feebc8c3ca7bd40f2f32f4f856b68b9a02870c.tar.gz
[PATCH] Clean up diff_setup() to make it more extensible.
This changes the argument of diff_setup() from an integer that says if we are feeding reversed diff to a bitmask, so that later global options can be added more easily. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-files.c')
-rw-r--r--diff-files.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-files.c b/diff-files.c
index d7cfad79e7..c9c914be14 100644
--- a/diff-files.c
+++ b/diff-files.c
@@ -11,7 +11,7 @@ static const char *diff_files_usage =
static int diff_output_format = DIFF_FORMAT_HUMAN;
static int detect_rename = 0;
-static int reverse_diff = 0;
+static int diff_setup_opt = 0;
static int diff_score_opt = 0;
static const char *pickaxe = NULL;
static int silent = 0;
@@ -51,7 +51,7 @@ int main(int argc, const char **argv)
else if (!strcmp(argv[1], "-z"))
diff_output_format = DIFF_FORMAT_MACHINE;
else if (!strcmp(argv[1], "-R"))
- reverse_diff = 1;
+ diff_setup_opt |= DIFF_SETUP_REVERSE;
else if (!strcmp(argv[1], "-S"))
pickaxe = argv[1] + 2;
else if (!strncmp(argv[1], "-M", 2)) {
@@ -75,7 +75,7 @@ int main(int argc, const char **argv)
exit(1);
}
- diff_setup(reverse_diff);
+ diff_setup(diff_setup_opt);
for (i = 0; i < entries; i++) {
struct stat st;