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
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 24, 2009, 13:52 UTC
Message-ID
<alpine.DEB.1.00.0903241449200.7493@intel-tinevez-2-302>
In-Reply-To
<49C8E074.4030808@gmail.com>
Hi,
On Tue, 24 Mar 2009, Roel Kluin wrote:
> > - the name is not expressive enough,
> 
> How about get-def? If it's too long it will become tiresome to type.
IMHO "git grep-c" would be more to the point...
Show 5 quoted lines
> > - the commit message is severely lacking (I had to apply it and run it 
> >   to find out what problem it tries to solve),
> 
> This is probably better:
> [...]
Yes, I like it!
Show 5 quoted lines
> > - maybe it would be nicer to integrate this into git grep itself?  
> >   Maybe by allowing multi-line matches and default patterns, or 
> >   pattern templates?
> 
> I did attempt to program it in C, but I am more comfortable with bash.

Did I misunderstand your code? I thought all it does is provide a way to match multiline patterns... but then, I could not do more than just quickly glance over the code.

> Also, what would be more appropriate for this purpose, I think, is a git 
> sed.

Just as it happens, this is a toy I am working on and off these days... strbuf_regsub() is already done, and half the needed code is in my version git grep.

Ciao, Dscho

Previous: Roel KluinNext: Ping Yin
Message 4 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.