Skip to content

Commit 61588cc

Browse files
pcloudsgitster
authored andcommitted
tree-diff: remove the use of pathspec's raw[] in follow-rename codepath
Put a checkpoint to guard unsupported pathspec features in future. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 84b8b5d commit 61588cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tree-diff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
224224
DIFF_OPT_SET(&diff_opts, RECURSIVE);
225225
DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER);
226226
diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
227-
diff_opts.single_follow = opt->pathspec.raw[0];
227+
diff_opts.single_follow = opt->pathspec.items[0].match;
228228
diff_opts.break_opt = opt->break_opt;
229229
diff_opts.rename_score = opt->rename_score;
230230
diff_setup_done(&diff_opts);
@@ -243,7 +243,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
243243
* the future!
244244
*/
245245
if ((p->status == 'R' || p->status == 'C') &&
246-
!strcmp(p->two->path, opt->pathspec.raw[0])) {
246+
!strcmp(p->two->path, opt->pathspec.items[0].match)) {
247247
const char *path[2];
248248

249249
/* Switch the file-pairs around */

0 commit comments

Comments
 (0)