Skip to content

Commit

Permalink
diff: pass the entire diff-options to diffcore_pickaxe()
Browse files Browse the repository at this point in the history
That would make it easier to give enhanced feature to the
pickaxe transformation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Aug 31, 2010
1 parent a2c2cef commit 382f013
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion diffcore-pickaxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion diffcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 382f013

Please sign in to comment.