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

Re: [PATCH] git-cget: prints elements of C code in the git repository

From
STSteven Tweed <orthochronous@gmail.com>
Date
Mar 24, 2009, 16:33 UTC
Message-ID
<d9c1caea0903240933n6dea7ddcl90a5e105c2a45b52@mail.gmail.com>
In-Reply-To
<e2b179460903240738x272c884q62a666931ce99c2f@mail.gmail.com>
On Tue, Mar 24, 2009 at 2:38 PM, Mike Ralphson <mike.ralphson@gmail.com> wrote:
> 2009/3/24 Jeff King <peff@peff.net>:
> This kind of pipeline has the benefit that it can actually work on the
> *repository*, and not just the working copy (as per the posted
> script).

Speaking of wanting things to work with the actual repository , one thing that I've been meaning to continue work on if I get the time is basically a 'show me any commit diff's that involve string s' (ie, the locations in which a change involving s occurs rather than just 'current file contains s (in exactly the same ways the previous version did). I'm extremely unlikely to actually produce anything based on that in the near future. But one thing that struck me that might be reasonably useful is some way of filtering the "context" that a string occurs in (is it in generic code context, in a string or in a comment). These are things that tend to be reasonably parametrisable by regular expressions (although escaping string delimiters within in strings makes completely correct behaviour tricky), so if git-grep itself were to be extended I'd prefer something that can be specified per search in a more generally usable way than something very C specific. Of course this is a quite difficult task as the actual diff may not contain enough lines to distinguish, eg, that it occurs within a longer comment. (As already disclaimed, I'm unlikely to actually get around to doing any of this work).

cheers, dave tweed
Previous: Mike RalphsonNext: Jeff King
Message 12 of 16 in “git-cget: prints elements of C code in the git repository”
  1. git-cget: prints elements of C code in the git repositoryRoel Kluin, Mar 24, 2009
  2. Johannes SchindelinMar 24, 2009
  3. Roel KluinMar 24, 2009
  4. Johannes SchindelinMar 24, 2009
  5. Ping YinMar 24, 2009
  6. Jeff KingMar 24, 2009
  7. Stefan KarpinskiMar 24, 2009
  8. Johannes SchindelinMar 24, 2009
  9. Mike RalphsonMar 24, 2009
  10. Johannes SchindelinMar 24, 2009
  11. Mike RalphsonMar 24, 2009
  12. Steven TweedMar 24, 2009
  13. Jeff KingMar 25, 2009
  14. roel kluinMar 24, 2009
  15. roel kluinMar 27, 2009
  16. Johannes SchindelinMar 27, 2009

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.