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
This commit is contained in:
@ -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++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user