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

Re: [PATCH] Support ent:relative_path

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 4, 2007, 17:17 UTC
Message-ID
<81b0412b0705041017l1ceb419j733e9cf3389e9709@mail.gmail.com>
In-Reply-To
<56b7f5510705040957v4580b6c1xbe767892ada3bcde@mail.gmail.com>
On 5/4/07, Dana How <danahow@gmail.com> wrote:
Show 10 quoted lines
> > > This all depends on deciding that :relpath should be the (incompatible)
> > > new default, and I'm not sure that's going to happen.
> >
> > If we are to stay that compatible, maybe ":./" for relative paths and the
> > old syntax left to mean top-level would the best choice for now.
>
> Let's summarize so far:  I think everyone's convinced me we need
> to be careful,  so this email will be more tedious than I'd like.
>
> (a) :./relpath clearly inidicates relative path. [Also take :../relpath .]
Ack
> (b) I'd like a more natural way to do :./relpath (e.g. :relpath),
>      or at least a future path to such.
> (c) We would like to avoid new special characters beyond ":".
>      This means everything has to be done with "." and "/".
And new semantics, if possible
> (d) We are left with the following patterns:
>      1. :string
Probably breaks something
>      2. :/string
Taken
>      3. ://string
Ugly (and breaks tab completion)
Show 9 quoted lines
> [ We need a clear way to say relative, a clear way to say absolute,
> and the current :string can change from absolute to relative some time
> in the future if we so decide. ]
>
> Ideas for (d) 2&3:
> I. Make :/string actually match the RE ^[/]*string,  and ://string a full path.
>    The leading [/]* is a very small change to get_sha1_oneline().
>    [Or change prefixcmp() to strstr() in get_sha1_oneline().]
>    How often do commit messages start with / ?
How often should they start to justify any decision?
> II. Make :/string a full path, and ://string match ^string .
>    Is changing the current :/string to ://string less painful/dangerous?
Johannes?
> III. Make :/string match ^string when string has no slashes,
>     :/string a full path when string does have slashes,
>     and ://string match ^string . Hmm,  seems confusing.
Very/
> Do you use :/string now?  Since it's a case-sensitive exact match,
No. It just exists, AFAICS
> I don't think I'd even use it.
> I find idea (II) most natural: absolute paths have one /,
> and string matches have 2 suggesting an RE.

I think, I'd be convinced by this one too, if not for "//" making no sense anywhere but root accidentally typed twice. I'd even sacrifice (or change) the search syntax for good.

Previous: Dana HowNext: Johannes Schindelin
Message 11 of 28 in “Support ent:relative_path”
  1. Support ent:relative_pathDana How, May 4, 2007
  2. Dana HowMay 4, 2007
  3. Junio C HamanoMay 4, 2007
  4. Dana HowMay 4, 2007
  5. Alex RiesenMay 4, 2007
  6. Dana HowMay 4, 2007
  7. Alex RiesenMay 4, 2007
  8. Dana HowMay 4, 2007
  9. Alex RiesenMay 4, 2007
  10. Dana HowMay 4, 2007
  11. Alex RiesenMay 4, 2007
  12. Johannes SchindelinMay 4, 2007
  13. Alex RiesenMay 4, 2007
  14. Johannes SixtMay 4, 2007
  15. Junio C HamanoMay 4, 2007
  16. Dana HowMay 4, 2007
  17. Johannes SchindelinMay 4, 2007
  18. Junio C HamanoMay 4, 2007
  19. Johannes SchindelinMay 4, 2007
  20. Junio C HamanoMay 4, 2007
  21. Johannes SchindelinMay 4, 2007
  22. Alex RiesenMay 4, 2007
  23. Jakub NarebskiMay 4, 2007
  24. Junio C HamanoMay 5, 2007
  25. Dana HowMay 5, 2007
  26. Jakub NarebskiMay 5, 2007
  27. Junio C HamanoMay 5, 2007
  28. Alex RiesenMay 4, 2007

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.