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

Re: Getting pickaxe to perform looser matches, or regex matching

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 7, 2012, 17:58 UTC
Message-ID
<7vy5nzgg1h.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACPiFCKyhZPQR+e27Ah5THiPPJy3akajGN5xMwBumP-Wj6JrKQ@mail.gmail.com>
Martin Langhoff <martin.langhoff@gmail.com> writes:
Show 20 quoted lines
> I am a regular user of gitk's nice pickaxe search field. But it will often
> fail to find what I am looking for because the part of the string I can
> provide is not the part that changes.
>
> For example, I am looking for patches that change any calls to function
> foo(). I want to match on
>
> - foo(1, 0, 1024)
> + foo(0, 1024, 1)
>
> but I don't know the parameters. As the "pickaxe" sections in gitdiffcore
> and git log manpages indicate, it won't match on -S'foo' because foo itself
> was not added or removed.
>
> A regex like "foo(.*" would work, but pickaxe doesn't seem to take
> regexes, and while I could roll my own wrapper around git-log --patch,
> this sounds like an important and useful variant to pickaxe that is
> missing.
>
> Or that has a hidden switch I haven't found ;-)
Like more expensive -G that was recently added?
Previous: Martin LanghoffNext: Martin Langhoff
Message 2 of 3 in “Getting pickaxe to perform looser matches, or regex matching”
  1. Martin LanghoffJun 7, 2012
  2. Junio C HamanoJun 7, 2012
  3. Martin LanghoffJun 7, 2012

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.