git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Excluding paths with wildcard not working with add -p
@ 2022-05-29 17:27 Robert Dailey
  2022-05-29 18:25 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Dailey @ 2022-05-29 17:27 UTC (permalink / raw)
  To: Git

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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-30 17:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-29 17:27 Excluding paths with wildcard not working with add -p Robert Dailey
2022-05-29 18:25 ` 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

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 NNTP newsgroup(s).