summaryrefslogtreecommitdiff
path: root/diff-cache.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-27 22:54:37 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-29 18:17:43 (GMT)
commit19feebc8c3ca7bd40f2f32f4f856b68b9a02870c (patch)
treee536ae939c90a8ce9c1278f6134ce5b6d1a72774 /diff-cache.c
parent09d9d1a648ecff1dd914224b3ee616b0486ec525 (diff)
downloadgit-19feebc8c3ca7bd40f2f32f4f856b68b9a02870c.zip
git-19feebc8c3ca7bd40f2f32f4f856b68b9a02870c.tar.gz
git-19feebc8c3ca7bd40f2f32f4f856b68b9a02870c.tar.bz2
[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-cache.c')
-rw-r--r--diff-cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-cache.c b/diff-cache.c
index d573459..963c628 100644
--- a/diff-cache.c
+++ b/diff-cache.c
@@ -5,7 +5,7 @@ static int cached_only = 0;
static int diff_output_format = DIFF_FORMAT_HUMAN;
static int match_nonexisting = 0;
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;
@@ -202,7 +202,7 @@ int main(int argc, const char **argv)
continue;
}
if (!strcmp(arg, "-R")) {
- reverse_diff = 1;
+ diff_setup_opt |= DIFF_SETUP_REVERSE;
continue;
}
if (!strcmp(arg, "-S")) {
@@ -224,7 +224,7 @@ int main(int argc, const char **argv)
usage(diff_cache_usage);
/* The rest is for paths restriction. */
- diff_setup(reverse_diff);
+ diff_setup(diff_setup_opt);
mark_merge_entries();