diff: pass the entire diff-options to diffcore_pickaxe()
That would make it easier to give enhanced feature to the pickaxe transformation. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Aug 31, 2010 at 13:44 UTC
382f013bc40452e4c24b8698217a14ff35f6dcec
3 files changed
+5
-3
diff.c
+1
-1
@@ -4166,7 +4166,7 @@ void diffcore_std(struct diff_options *options)
4166
diffcore_merge_broken();
4167
}
4168
if (options->pickaxe)
4169
- diffcore_pickaxe(options->pickaxe, options->pickaxe_opts);
4169
+ diffcore_pickaxe(options);
4170
if (options->orderfile)
4171
diffcore_order(options->orderfile);
4172
if (!options->found_follow)
diffcore-pickaxe.c
+3
-1
@@ -48,8 +48,10 @@ static unsigned int contains(struct diff_filespec *one,
48
return cnt;
49
}
50
51
-void diffcore_pickaxe(const char *needle, int opts)
51
+void diffcore_pickaxe(struct diff_options *o)
52
{
53
+ const char *needle = o->pickaxe;
54
+ int opts = o->pickaxe_opts;
55
struct diff_queue_struct *q = &diff_queued_diff;
56
unsigned long len = strlen(needle);
57
int i, has_changes;
diffcore.h
+1
-1
@@ -107,7 +107,7 @@ extern void diff_q(struct diff_queue_struct *, struct diff_filepair *);
107
extern void diffcore_break(int);
108
extern void diffcore_rename(struct diff_options *);
109
extern void diffcore_merge_broken(void);
110
-extern void diffcore_pickaxe(const char *needle, int opts);
110
+extern void diffcore_pickaxe(struct diff_options *);
111
extern void diffcore_order(const char *orderfile);
112
113
#define DIFF_DEBUG 0