[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 <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Junio C Hamano
2005-05-29 16:56:13 -07:00
committed by Linus Torvalds
parent ddafa7e933
commit befe86392c
5 changed files with 25 additions and 16 deletions

View File

@ -116,12 +116,9 @@ int main(int argc, const char **argv)
show_modified(oldmode, mode, ce->sha1, null_sha1,
ce->name);
}
if (1 < argc)
diffcore_pathspec(argv + 1);
if (detect_rename)
diffcore_rename(detect_rename, diff_score_opt);
if (pickaxe)
diffcore_pickaxe(pickaxe, pickaxe_opts);
diffcore_std(argv + 1,
detect_rename, diff_score_opt,
pickaxe, pickaxe_opts);
diff_flush(diff_output_format, 1);
return 0;
}