git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "git add -p ." raises an unexpected "warning: empty strings as pathspecs will be made invalid in upcoming releases. please use . instead if you meant to match all paths"

From
Kevin Daudt <me@ikke.info>
Date
Nov 30, 2016, 21:11 UTC
Message-ID
<20161130211100.GA18680@ikke.info>
In-Reply-To
<CAEnOLdvG=SoKFxeJ_pLmamGj_8osC+28TSg+pbFLLTr+ZLcpQA@mail.gmail.com>
On Wed, Nov 30, 2016 at 12:31:49PM -0800, Peter Urda wrote:
Show 18 quoted lines
> After upgrading to version 2.11.0 I am getting a warning about empty
> strings as pathspecs while using 'patch'
> 
> - Ran 'git add -p .' from the root of my git repository.
> 
> - I was able to normally stage my changes, but was presented with a
> "warning: empty strings as pathspecs will be made invalid in upcoming
> releases. please use . instead if you meant to match all paths"
> message.
> 
> - I expected no warning message since I included a "." with my original command.
> 
> I believe that I should not be seeing this warning message as I
> included the requested "." pathspec.
> 
> ~ Peter Urda
> 
> http://urda.cc

I can reproduce this. Note that it only happens when you specify '-p'. Without the --patch option, the warning does not appear.

Previous: Peter UrdaNext: Junio C Hamano
Message 2 of 6 in “"git add -p ." raises an unexpected "warning: empty strings as pathspecs will be made invalid in upcoming releases. please use . instead if you meant to match all paths"”
  1. Peter UrdaNov 30, 2016
  2. Kevin DaudtNov 30, 2016
  3. Junio C HamanoNov 30, 2016
  4. Junio C HamanoNov 30, 2016
  5. Brandon WilliamsDec 6, 2016
  6. Junio C HamanoDec 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.