convert some get_pathspec() calls to parse_pathspec()
These call sites follow the pattern: paths = get_pathspec(prefix, argv); init_pathspec(&pathspec, paths); which can be converted into a single parse_pathspec() call. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
fc12261fea
commit
0fdc2ae512
@ -2120,8 +2120,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
|
||||
*/
|
||||
ALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc);
|
||||
prune_data.path[prune_data.nr++] = NULL;
|
||||
init_pathspec(&revs->prune_data,
|
||||
get_pathspec(revs->prefix, prune_data.path));
|
||||
parse_pathspec(&revs->prune_data, 0, 0,
|
||||
revs->prefix, prune_data.path);
|
||||
}
|
||||
|
||||
if (revs->def == NULL)
|
||||
|
Reference in New Issue
Block a user