[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 |||