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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Jul 14, 2013 at 15:36 UTC
61588ccf78373f5211ecdc56d53f0e17d04283fe
1 file changed
+2
-2
tree-diff.c
+2
-2
@@ -224,7 +224,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
224
DIFF_OPT_SET(&diff_opts, RECURSIVE);
225
DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER);
226
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;
228
diff_opts.break_opt = opt->break_opt;
229
diff_opts.rename_score = opt->rename_score;
230
diff_setup_done(&diff_opts);
@@ -243,7 +243,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
243
* the future!
244
*/
245
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)) {
247
const char *path[2];
248
249
/* Switch the file-pairs around */