From 2249d4dbc197d45da5407cbc80b2461e49bb8785 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 11 May 2017 15:04:26 -0700 Subject: pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP Since (ae8d08242 pathspec: pass directory indicator to match_pathspec_item()) the path matching logic has been able to cope with submodules without needing to strip off a trailing slash if a path refers to a submodule. Since stripping the slash is no longer necessary, remove the PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP flag. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- builtin/reset.c | 1 - builtin/rm.c | 3 +-- builtin/submodule--helper.c | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'builtin') diff --git a/builtin/reset.c b/builtin/reset.c index fc3b906c47..5db2adc4c4 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -236,7 +236,6 @@ static void parse_args(struct pathspec *pathspec, parse_pathspec(pathspec, 0, PATHSPEC_PREFER_FULL | - PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP | (patch_mode ? PATHSPEC_PREFIX_ORIGIN : 0), prefix, argv); } diff --git a/builtin/rm.c b/builtin/rm.c index fb79dcab18..7c323d0123 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -271,8 +271,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) die(_("index file corrupt")); parse_pathspec(&pathspec, 0, - PATHSPEC_PREFER_CWD | - PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP, + PATHSPEC_PREFER_CWD, prefix, argv); refresh_index(&the_index, REFRESH_QUIET, &pathspec, NULL, NULL); diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 566a5b6a6f..8cc648d85b 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -233,8 +233,7 @@ static int module_list_compute(int argc, const char **argv, int i, result = 0; char *ps_matched = NULL; parse_pathspec(pathspec, 0, - PATHSPEC_PREFER_FULL | - PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP, + PATHSPEC_PREFER_FULL, prefix, argv); if (pathspec->nr) -- cgit v1.2.3