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

[RFD] Place to document magic pathspecs like ":/" and pathspec handling

From
Jakub Narębski <jnareb@gmail.com>
Date
Jun 29, 2016, 19:47 UTC
Message-ID
<577425EF.6030900@gmail.com>
Hello,
123456789012345678901234567890123456789012345678901234567890123456789012345|

I have noticed that the magic pathspec ":/" is described only in RelNotes for revision 1.7.6:

|* A magic pathspec ":/" tells a command that limits its operation to the current directory when ran from a subdirectory to work on the entire working tree. In general, ":/path/to/file" would be relative to the root of the working tree hierarchy. After "git reset --hard; edit Makefile; cd t/", "git add -u" would be a no-op, but "git add -u :/" would add the updated contents of the Makefile at the top level. If you want to name a path in the current subdirectory whose unusual name begins with ":/", you can name it by "./:/that/path" or by "\:/that/path".|
||
|I think the reason might be that there was no good place to put that
information in.  Nowadays we have gitcli(7) manual page, but perhaps
it would be better to create a separate manpage for issues related
to pathspec handling (of which ":/" is only one part)... but then
what should it be named?
What do you think?
-- 
Jakub Narębski
|||
Next: Junio C Hamano
Message 1 of 8 in “[RFD] Place to document magic pathspecs like ":/" and pathspec handling”
  1. Jakub NarębskiJun 29, 2016
  2. Junio C HamanoJun 29, 2016
  3. Jakub NarębskiJun 29, 2016
  4. Junio C HamanoJun 29, 2016
  5. Jakub NarębskiJun 30, 2016
  6. Duy NguyenJun 30, 2016
  7. Jeff KingJul 1, 2016
  8. Jakub NarębskiJul 1, 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.