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

Re: [PATCH] Interpret :/<pattern> as a regular expression

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 13, 2007, 01:21 UTC
Message-ID
<7v1wggir80.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<Pine.LNX.4.64.0706130148080.4059@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 13 quoted lines
> Earlier, Git interpreted the pattern as a strict prefix, which made
> the operator unsuited in many cases.
>
> Now, the pattern is interpreted as a regular expression (which does not 
> change the behaviour too much, since few onelines contain special regex 
> characters), so that you can say
>
> 	git diff :/.*^Signed-off-by:.Zack.Brown
>
> to see the diff against the most recent reachable commit which was
> signed off by Zack, whose Kernel Cousin I miss very much.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

While this perhaps is an improvement and people who are not interested in paying the price have a choice of not using this silly syntax, I am moderately annoyed that the syntax does not define "the most recent reachable" very well. It is more like "the first one we happened to pick by diffing from reachable refs". It would be more useful if it took "$commit:/$pattern" form to limit the search among reachable ones from named commit.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 14 in “Interpret :/<pattern> as a regular expression”
  1. Interpret :/<pattern> as a regular expressionJohannes Schindelin, Jun 13, 2007
  2. Junio C HamanoJun 13, 2007
  3. Johannes SchindelinJun 13, 2007
  4. Junio C HamanoJun 13, 2007
  5. Johannes SchindelinJun 13, 2007
  6. (unknown)Johannes Schindelin, Jun 13, 2007
  7. Interpret :/<pattern> as a regular expressionJohannes Schindelin, Jun 13, 2007
  8. Jeff KingJun 13, 2007
  9. Johannes SchindelinJun 13, 2007
  10. Jeff KingJun 13, 2007
  11. Johannes SchindelinJun 13, 2007
  12. Sam VilainJun 14, 2007
  13. Johannes SchindelinJun 14, 2007
  14. Sam VilainJun 14, 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.