Re: [PATCH] Interpret :/<pattern> as a regular expression
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 13, 2007, 13:13 UTC
- Message-ID
- <Pine.LNX.4.64.0706131412320.4059@racer.site>
- In-Reply-To
- <7v1wggir80.fsf@assigned-by-dhcp.pobox.com>
Hi,
On Tue, 12 Jun 2007, Junio C Hamano wrote:
Show 23 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > 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.
"Unfortunately", $commit:/$pattern is not a good syntax, since it suggests that you want to search _in_ $commit, not _from $commit.
How about ':/!commit=$commit:$pattern'?
Ciao, Dscho