@@ -323,7 +323,7 @@ static int rev_compare_tree(struct rev_info *revs, struct commit *parent, struct
323323 * tagged commit by specifying both --simplify-by-decoration
324324 * and pathspec.
325325 */
326- if (!revs -> prune_data )
326+ if (!revs -> prune_data . nr )
327327 return REV_TREE_SAME ;
328328 }
329329
@@ -969,7 +969,7 @@ static void prepare_show_merge(struct rev_info *revs)
969969 struct cache_entry * ce = active_cache [i ];
970970 if (!ce_stage (ce ))
971971 continue ;
972- if (ce_path_match (ce , revs -> prune_data )) {
972+ if (ce_path_match (ce , revs -> prune_data . raw )) {
973973 prune_num ++ ;
974974 prune = xrealloc (prune , sizeof (* prune ) * prune_num );
975975 prune [prune_num - 2 ] = ce -> name ;
@@ -979,7 +979,8 @@ static void prepare_show_merge(struct rev_info *revs)
979979 ce_same_name (ce , active_cache [i + 1 ]))
980980 i ++ ;
981981 }
982- revs -> prune_data = prune ;
982+ free_pathspec (& revs -> prune_data );
983+ init_pathspec (& revs -> prune_data , prune );
983984 revs -> limited = 1 ;
984985}
985986
@@ -1616,7 +1617,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
16161617 }
16171618
16181619 if (prune_data )
1619- revs -> prune_data = get_pathspec (revs -> prefix , prune_data );
1620+ init_pathspec ( & revs -> prune_data , get_pathspec (revs -> prefix , prune_data ) );
16201621
16211622 if (revs -> def == NULL )
16221623 revs -> def = opt ? opt -> def : NULL ;
@@ -1647,13 +1648,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
16471648 if (revs -> topo_order )
16481649 revs -> limited = 1 ;
16491650
1650- if (revs -> prune_data ) {
1651- diff_tree_setup_paths (revs -> prune_data , & revs -> pruning );
1651+ if (revs -> prune_data . nr ) {
1652+ diff_tree_setup_paths (revs -> prune_data . raw , & revs -> pruning );
16521653 /* Can't prune commits with rename following: the paths change.. */
16531654 if (!DIFF_OPT_TST (& revs -> diffopt , FOLLOW_RENAMES ))
16541655 revs -> prune = 1 ;
16551656 if (!revs -> full_diff )
1656- diff_tree_setup_paths (revs -> prune_data , & revs -> diffopt );
1657+ diff_tree_setup_paths (revs -> prune_data . raw , & revs -> diffopt );
16571658 }
16581659 if (revs -> combine_merges )
16591660 revs -> ignore_merges = 0 ;
0 commit comments