From ac1b3d1248f36b26c2eab55022b9a54bde36b1ee Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 20 Oct 2005 21:05:05 -0700 Subject: Split up tree diff functions into tree-diff.c library This makes the tree diff functionality independent of the "git-diff-tree" program, by splitting the core functionality up into a library file. This will be needed for when we teach git-rev-list to only follow a specified set of pathnames, rather than the global revision history. Most of it is a fairly straightforward code move, but it also involves some calling convention cleanup, and moving some of the static variables from diff-tree.c into the options structure. The actual tree change callback routines also become paramterized by the diff_options structure, allowing the library functionality to do something else than just show the diff on stdout. Right now the only user of this functionality remains git-diff-tree itself. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- diff.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'diff.c') diff --git a/diff.c b/diff.c index 306bcd980..ec94a96a5 100644 --- a/diff.c +++ b/diff.c @@ -754,6 +754,9 @@ void diff_setup(struct diff_options *options) options->line_termination = '\n'; options->break_opt = -1; options->rename_limit = -1; + + options->change = diff_change; + options->add_remove = diff_addremove; } int diff_setup_done(struct diff_options *options) -- cgit v1.2.1