Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-08 00:10:59 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-08 00:10:59 +0300
commitf00809500f35ed2dbef9e58ae07ca2b6dcc82776 (patch)
treef1120224b60e02560a900ebf509dd6116d6c89a6 /pathspec.c
parent08baf19fa316b8395bb0d984d66d438d233d2b5c (diff)
parentb02fdbc80a41f73ceb6c99e8e27b22285243a335 (diff)
Merge branch 'jc/all-negative-pathspec'
A git subcommand like "git add -p" spawns a separate git process while relaying its command line arguments. A pathspec with only negative elements was mistakenly passed with an empty string, which has been corrected. * jc/all-negative-pathspec: pathspec: correct an empty string used as a pathspec element
Diffstat (limited to 'pathspec.c')
-rw-r--r--pathspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pathspec.c b/pathspec.c
index ddeeba7911..84ad9c73cf 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -629,7 +629,7 @@ void parse_pathspec(struct pathspec *pathspec,
*/
if (nr_exclude == n) {
int plen = (!(flags & PATHSPEC_PREFER_CWD)) ? 0 : prefixlen;
- init_pathspec_item(item + n, 0, prefix, plen, "");
+ init_pathspec_item(item + n, 0, prefix, plen, ".");
pathspec->nr++;
}