diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-06-07 14:10:59 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-06-07 14:10:59 -0700 |
| commit | f00809500f35ed2dbef9e58ae07ca2b6dcc82776 (patch) | |
| tree | f1120224b60e02560a900ebf509dd6116d6c89a6 /pathspec.c | |
| parent | Merge branch 'js/scalar-diagnose' (diff) | |
| parent | pathspec: correct an empty string used as a pathspec element (diff) | |
| download | git-f00809500f35ed2dbef9e58ae07ca2b6dcc82776.tar.gz git-f00809500f35ed2dbef9e58ae07ca2b6dcc82776.zip | |
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.c | 2 |
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++; } |
