Skip to content

Commit 382f013

Browse files
committed
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>
1 parent a2c2cef commit 382f013

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4166,7 +4166,7 @@ void diffcore_std(struct diff_options *options)
41664166
diffcore_merge_broken();
41674167
}
41684168
if (options->pickaxe)
4169-
diffcore_pickaxe(options->pickaxe, options->pickaxe_opts);
4169+
diffcore_pickaxe(options);
41704170
if (options->orderfile)
41714171
diffcore_order(options->orderfile);
41724172
if (!options->found_follow)

diffcore-pickaxe.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ static unsigned int contains(struct diff_filespec *one,
4848
return cnt;
4949
}
5050

51-
void diffcore_pickaxe(const char *needle, int opts)
51+
void diffcore_pickaxe(struct diff_options *o)
5252
{
53+
const char *needle = o->pickaxe;
54+
int opts = o->pickaxe_opts;
5355
struct diff_queue_struct *q = &diff_queued_diff;
5456
unsigned long len = strlen(needle);
5557
int i, has_changes;

diffcore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extern void diff_q(struct diff_queue_struct *, struct diff_filepair *);
107107
extern void diffcore_break(int);
108108
extern void diffcore_rename(struct diff_options *);
109109
extern void diffcore_merge_broken(void);
110-
extern void diffcore_pickaxe(const char *needle, int opts);
110+
extern void diffcore_pickaxe(struct diff_options *);
111111
extern void diffcore_order(const char *orderfile);
112112

113113
#define DIFF_DEBUG 0

0 commit comments

Comments
 (0)