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

Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Mar 1, 2011, 11:50 UTC
Message-ID
<AANLkTinke05gcQbrDLSUoBUus5gnx+ci5830766d2Jqs@mail.gmail.com>
In-Reply-To
<4D6CD593.2090705@drmicha.warpmail.net>

On Tue, Mar 1, 2011 at 6:16 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 21 quoted lines
> Nguyen Thai Ngoc Duy venit, vidit, dixit 01.03.2011 12:13:
>> 2011/3/1 Michael J Gruber <git@drmicha.warpmail.net>:
>>> Introduce a leading ':' as the notation for repo-wide pathspecs.
>>>
>>> This is in line with our treeish:path notation which defaults to
>>> repowide paths.
>>>
>>> Heck: Even ':./path' works for pathspecs, and I have no clue why!
>>
>> If you are going to turn pathspecs into something more complex,
>> reserve room for future extension. I have negative pathspecs that can
>> utilize it.
>>
>> I take it, from now on people must refer file name ':foo' as './:foo'
>> with your patch?
>
> That is up for discussion, of course. When discussing a new approach for
> file mode dependent attributes, I was hoping to get through with
> symlink:path, and did not. But it was decided that something like
> :symlink:path would be good enough, in the sense of avoiding enough
> possible conflicts. That made me hope that :path would be, too.
Take me down. I'm going crazy now.

Another, less cryptic choice, is to make these special notations separate from true pathspecs. For example, instead of ":foo" we can say "--root foo". get_pathspec() and friends can be updated to remove --root and rewrite the next pathspec. Extensibility is obvious. Problems are plenty:

 - may be confused with command line options without "--" as separator
("-:" on the other hand is not, but looks weird)
 - '-' is not a reserved letter, the same as ':'
 - ...
Show 5 quoted lines
> (I have not checked for interaction of those two, which are in flight.)
>
> I would think that file names like ":foo" are problematic on msys
> already, so in a sense they are no-no already, and free to take as
> special notation.

Back to what I'm writing above, '-' may be chosen over ':' even without separation because UNIXers are trained that '-' is usually the beginning of something special, I suppose most of us would go with ./-blah for file names.

-- 
Duy
Previous: Michael J GruberNext: Michael J Gruber
Message 19 of 46 in “git-grep to operate across who repository and not just CWD?”
  1. David ChantersFeb 28, 2011
  2. Michael J GruberFeb 28, 2011
  3. Jay SoffianFeb 28, 2011
  4. Junio C HamanoFeb 28, 2011
  5. Junio C HamanoFeb 28, 2011
  6. Phil HordFeb 28, 2011
  7. Michael J GruberMar 1, 2011
  8. Nguyen Thai Ngoc DuyMar 1, 2011
  9. Michael J GruberMar 1, 2011
  10. Nguyen Thai Ngoc DuyMar 1, 2011
  11. Nguyen Thai Ngoc DuyMar 1, 2011
  12. 0/2 grep --full-treeMichael J Gruber, Mar 1, 2011
  13. 1/2 grep: --full-treeMichael J Gruber, Mar 1, 2011
  14. 2/2 grep: make --full-tree work with pathspecsMichael J Gruber, Mar 1, 2011
  15. Junio C HamanoMar 1, 2011
  16. setup.c: denote repo wide pathspecs by ':'Michael J Gruber, Mar 1, 2011
  17. Nguyen Thai Ngoc DuyMar 1, 2011
  18. Michael J GruberMar 1, 2011
  19. Nguyen Thai Ngoc DuyMar 1, 2011
  20. Michael J GruberMar 1, 2011
  21. Nguyen Thai Ngoc DuyMar 1, 2011
  22. Junio C HamanoMar 1, 2011
  23. Michael J GruberMar 1, 2011
  24. Junio C HamanoMar 1, 2011
  25. Sverre RabbelierMar 2, 2011
  26. Nguyen Thai Ngoc DuyMar 2, 2011
  27. Michael J GruberMar 2, 2011
  28. Junio C HamanoMar 2, 2011
  29. Michael J GruberMar 2, 2011
  30. Miles BaderMar 3, 2011
  31. Junio C HamanoMar 3, 2011
  32. Phil HordMar 3, 2011
  33. Michael J GruberMar 3, 2011
  34. Phil HordMar 1, 2011
  35. James PickensMar 1, 2011
  36. Nguyen Thai Ngoc DuyMar 2, 2011
  37. Phil HordMar 3, 2011
  38. Michael J GruberMar 3, 2011
  39. Michael J GruberMar 1, 2011
  40. Phil HordMar 1, 2011
  41. pathspec: reserve some letters after a colon pathspecNguyễn Thái Ngọc Duy, Mar 23, 2011
  42. Junio C HamanoMar 23, 2011
  43. Michael J GruberMar 24, 2011
  44. Nguyen Thai Ngoc DuyMar 24, 2011
  45. Junio C HamanoMar 24, 2011
  46. Junio C HamanoMar 24, 2011

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.