git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] git-cget: prints elements of C code in the git repository
Date: Tue, 24 Mar 2009 09:59:07 -0400	[thread overview]
Message-ID: <20090324135906.GA10644@coredump.intra.peff.net> (raw)
In-Reply-To: <49C8E074.4030808@gmail.com>

On Tue, Mar 24, 2009 at 02:30:28PM +0100, Roel Kluin wrote:

> > - 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:
> 
> This script shows where elements of C code are defined in the git-repository.
> It is still experimental, although it should work in most cases.

Wouldn't it be a lot easier to base this on something like ctags, which
already knows how to do all the parsing of C quirky C?

I.e.:

  git ls-files | xargs ctags
  vi -t get_sha1

Where you can replace "vi" with your editor of choice. And if you really
like getting the definition dumped to stdout, writing a command-line
viewer for the ctags format would be quite simple (and I would be
surprised if one hasn't been written already).

-Peff

  parent reply	other threads:[~2009-03-24 14:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-24 10:09 [PATCH] git-cget: prints elements of C code in the git repository Roel Kluin
2009-03-24 12:05 ` Johannes Schindelin
2009-03-24 13:30   ` Roel Kluin
2009-03-24 13:52     ` Johannes Schindelin
2009-03-24 15:08       ` Ping Yin
2009-03-24 13:59     ` Jeff King [this message]
2009-03-24 14:04       ` Stefan Karpinski
2009-03-24 14:05       ` Johannes Schindelin
2009-03-24 14:38       ` Mike Ralphson
2009-03-24 14:56         ` Johannes Schindelin
2009-03-24 16:37           ` Mike Ralphson
2009-03-24 16:33         ` Steven Tweed
2009-03-25  4:23           ` Jeff King
2009-03-24 16:17       ` roel kluin
2009-03-27  9:22   ` roel kluin
2009-03-27 11:26     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090324135906.GA10644@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).