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

Re: [RFC/PATCH] recognize pathspec magic without "--" disambiguation

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 27, 2017, 09:54 UTC
Message-ID
<CACBZZX6K7ppVB0qYah76_+pjTKjsco3rHT0xRyKtF2H1dS4k_w@mail.gmail.com>
In-Reply-To
<20170525152739.t63dbsq2dojy2y2h@sigill.intra.peff.net>
On Thu, May 25, 2017 at 5:27 PM, Jeff King <peff@peff.net> wrote:
>         git log :/foo.*bar

Another option would be to deprecate the :/rx syntax over some period in favor of ^{/rx}.

I think it's too ugly to live, and really useless. It's equivalent to "--grep=<rx> --all". Does anyone use this and not really mean to use ^{/rx}? E.g. "git show :/fix" might show a fix on some unrelated branch you recently rebased.

>       will be treated as a pathspec (if it doesn't match a
>       commit message) due to the wildcard matching in
>       28fcc0b71.

So it might DWYM after hanging there looking at your entire history for a commit message matching foo.*bar? And if you make such a commit it'll start meaning something else entirely?

Previous: Jeff KingNext: Jeff King
Message 11 of 13 in “recognize pathspec magic without "--" disambiguation”
  1. recognize pathspec magic without "--" disambiguationJeff King, May 25, 2017
  2. Junio C HamanoMay 26, 2017
  3. Jeff KingMay 26, 2017
  4. 0/6 make "^:foo" work without disambiguating "--"Jeff King, May 26, 2017
  5. 1/6 t4208: add check for ":/" without matching fileJeff King, May 26, 2017
  6. 3/6 check_filename(): use skip_prefixJeff King, May 26, 2017
  7. 2/6 check_filename(): refactor ":/" handlingJeff King, May 26, 2017
  8. 4/6 check_filename(): handle ":^" path magicJeff King, May 26, 2017
  9. 6/6 verify_filename(): flip order of checksJeff King, May 26, 2017
  10. 5/6 verify_filename(): treat ":(magic)" as a pathspecJeff King, May 26, 2017
  11. Ævar Arnfjörð BjarmasonMay 27, 2017
  12. Jeff KingMay 27, 2017
  13. Junio C HamanoMay 28, 2017

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.