From: Robert Dailey <rcdailey.lists@gmail.com>
To: Git <git@vger.kernel.org>
Subject: Excluding paths with wildcard not working with add -p
Date: Sun, 29 May 2022 12:27:33 -0500 [thread overview]
Message-ID: <CAHd499D81VN=aGsM6kaNLF2ZMg-Zg10U=qU-j7gQ7uXnqqfdqg@mail.gmail.com> (raw)
If I run the command:
git add -p -- ':^*.cs'
I get an error:
fatal: empty string is not a valid pathspec. please use . instead if
you meant to match all paths
Cannot close git diff-index --cached --numstat --summary HEAD --
:(exclude,prefix:0)*.cs () at C:/Program
Files/Git/mingw64/libexec/git-core\git-add--interactive line 242.
However, it works if I remove `-p`. Also observed this works too:
git add -p -- ':*.cs'
So it looks like we have a corner case where I can't do a patch add
while excluding files. Is this intentional?
next reply other threads:[~2022-05-29 17:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 17:27 Robert Dailey [this message]
2022-05-29 18:25 ` Excluding paths with wildcard not working with add -p Junio C Hamano
2022-05-29 18:42 ` Junio C Hamano
2022-05-29 22:39 ` [PATCH] pathspec: correct an empty string used as a pathspec element Junio C Hamano
2022-05-29 23:01 ` rsbecker
2022-05-29 21:15 ` Excluding paths with wildcard not working with add -p Robert Dailey
2022-05-30 17:20 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHd499D81VN=aGsM6kaNLF2ZMg-Zg10U=qU-j7gQ7uXnqqfdqg@mail.gmail.com' \
--to=rcdailey.lists@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).