Code

diff: pass the entire diff-options to diffcore_pickaxe()
authorJunio C Hamano <gitster@pobox.com>
Tue, 31 Aug 2010 20:44:39 +0000 (13:44 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Aug 2010 21:30:28 +0000 (14:30 -0700)
That would make it easier to give enhanced feature to the
pickaxe transformation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
diffcore-pickaxe.c
diffcore.h

diff --git a/diff.c b/diff.c
index 6fb97d4623192167e9b9f83b02dfe9250f028c0a..6631fa387cb716dc44834b04a2cf5bfd87226222 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4166,7 +4166,7 @@ void diffcore_std(struct diff_options *options)
                        diffcore_merge_broken();
        }
        if (options->pickaxe)
-               diffcore_pickaxe(options->pickaxe, options->pickaxe_opts);
+               diffcore_pickaxe(options);
        if (options->orderfile)
                diffcore_order(options->orderfile);
        if (!options->found_follow)
index 929de15aa9228099b3a772be788d746e440a9e8c..13f61fbb083747adf41be8e01951c55055ee20c2 100644 (file)
@@ -48,8 +48,10 @@ static unsigned int contains(struct diff_filespec *one,
        return cnt;
 }
 
-void diffcore_pickaxe(const char *needle, int opts)
+void diffcore_pickaxe(struct diff_options *o)
 {
+       const char *needle = o->pickaxe;
+       int opts = o->pickaxe_opts;
        struct diff_queue_struct *q = &diff_queued_diff;
        unsigned long len = strlen(needle);
        int i, has_changes;
index 8b3241ad137f5934e32336cd1caf8d99ca11d1f5..b8f1fdecf4d9e5e8f8e834eb55a374f1af8352fd 100644 (file)
@@ -107,7 +107,7 @@ extern void diff_q(struct diff_queue_struct *, struct diff_filepair *);
 extern void diffcore_break(int);
 extern void diffcore_rename(struct diff_options *);
 extern void diffcore_merge_broken(void);
-extern void diffcore_pickaxe(const char *needle, int opts);
+extern void diffcore_pickaxe(struct diff_options *);
 extern void diffcore_order(const char *orderfile);
 
 #define DIFF_DEBUG 0