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

Re: git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"

From
Noam Postavsky <npostavs@users.sourceforge.net>
Date
Oct 24, 2015, 16:55 UTC
Message-ID
<CAM-tV-8Qpy2fLMU=x7Yc4x2BhwpwN+0zZtJspYMZpamCij=z5A@mail.gmail.com>
In-Reply-To
<562B2FB2.4080604@gmail.com>
On Sat, Oct 24, 2015 at 3:13 AM, Victor Leschuk <vleschuk@gmail.com> wrote:
> The problem is that in the absence of explicit argument we set the list of
> files to special path ":/" which means repo root:
> And after that we treat it as regular file
Aha.
> Maybe it'll make sense to modify file_exists() to treat ":/" specially.

I'm not sure how this would translate into code, but it would make more sense to me if we undo the effect of --literal-pathspecs when setting arguments to ":/". After all, it's obviously not meant to be a literal file so it shouldn't treated as one (also this way still allows a user to pass --literal-pathspecs with ":/" to add an actual directory named ":" (not that anyone should ever want that)).

Previous: Victor LeschukNext: Junio C Hamano
Message 3 of 4 in “git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"”
  1. Noam PostavskyOct 23, 2015
  2. Victor LeschukOct 24, 2015
  3. Noam PostavskyOct 24, 2015
  4. Re* git --literal-pathspecs add -u says "fatal: pathspec ':/' did not match any files"Junio C Hamano, Oct 24, 2015

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.