Skip to content

Commit

Permalink
tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
Browse files Browse the repository at this point in the history
Put a checkpoint to guard unsupported pathspec features in future.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Jul 15, 2013
1 parent 84b8b5d commit 61588cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tree-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
DIFF_OPT_SET(&diff_opts, RECURSIVE);
DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER);
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
diff_opts.single_follow = opt->pathspec.raw[0];
diff_opts.single_follow = opt->pathspec.items[0].match;
diff_opts.break_opt = opt->break_opt;
diff_opts.rename_score = opt->rename_score;
diff_setup_done(&diff_opts);
Expand All @@ -243,7 +243,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
* the future!
*/
if ((p->status == 'R' || p->status == 'C') &&
!strcmp(p->two->path, opt->pathspec.raw[0])) {
!strcmp(p->two->path, opt->pathspec.items[0].match)) {
const char *path[2];

/* Switch the file-pairs around */
Expand Down

0 comments on commit 61588cc

Please sign in to comment.