From befe86392c767b62e4a6498cf951faae6f2c5ea3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 29 May 2005 16:56:13 -0700 Subject: [PATCH] diff: consolidate various calls into diffcore. The three diff-* brothers had a sequence of calls into diffcore that were almost identical. Introduce a new diffcore_std() function that takes all the necessary arguments to consolidate it. This will make later enhancements and changing the order of diffcore application simpler. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- diff-tree.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'diff-tree.c') diff --git a/diff-tree.c b/diff-tree.c index 8bdb1dba59..d634cb19e4 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -261,10 +261,9 @@ static void call_diff_setup(void) static int call_diff_flush(void) { - if (detect_rename) - diffcore_rename(detect_rename, diff_score_opt); - if (pickaxe) - diffcore_pickaxe(pickaxe, pickaxe_opts); + diffcore_std(0, + detect_rename, diff_score_opt, + pickaxe, pickaxe_opts); if (diff_queue_is_empty()) { diff_flush(DIFF_FORMAT_NO_OUTPUT, 0); return 0; -- cgit v1.2.1