From: Jeff King <peff@peff.net>
To: Joshua Jensen <jjensen@workspacewhiz.com>
Cc: Johannes Sixt <j6t@kdbg.org>, Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Quickly searching for a note
Date: Fri, 21 Sep 2012 19:37:24 -0400 [thread overview]
Message-ID: <20120921233723.GA29433@sigill.intra.peff.net> (raw)
In-Reply-To: <505CD7D0.2000505@workspacewhiz.com>
On Fri, Sep 21, 2012 at 03:10:40PM -0600, Joshua Jensen wrote:
> ----- Original Message -----
> From: Johannes Sixt
> Date: 9/21/2012 2:50 PM
> >The trick is to pipe 'git log' output into another process that reads no
> >more than it needs and exits. Then 'git log' dies from SIGPIPE before it
> >processed all 1000 commits because its down-stream has gone away.
> >
> >For example:
> >
> > git log --show-notes=p4notes -1000 |
> > sed -n -e '/^commit /h' -e '/P4@/{H;g;p;q}'
> >
> >(The pipeline keeps track of the most recent 'commit' line, and when it
> >finds the 'P4@' it prints the most recent 'commit' line followed by the
> >'P4@' line.)
> >
> Got it. I'll try that out now.
I think people have provided sane techniques for doing this with a
pipeline. But there is really no reason not to have --grep-notes, just
as we have --grep. It's simply that nobody has implemented it yet (and
nobody is working on it as far as I know). It would actually be a fairly
simple feature to add if somebody wanted to get their feet wet with git.
-Peff
next prev parent reply other threads:[~2012-09-21 23:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 14:41 Quickly searching for a note Joshua Jensen
2012-09-21 15:10 ` Andreas Schwab
2012-09-21 18:34 ` Joshua Jensen
2012-09-21 17:21 ` Junio C Hamano
2012-09-21 18:29 ` Joshua Jensen
2012-09-21 20:04 ` Junio C Hamano
2012-09-21 20:25 ` Joshua Jensen
2012-09-21 20:50 ` Johannes Sixt
2012-09-21 21:10 ` Joshua Jensen
2012-09-21 23:37 ` Jeff King [this message]
2012-09-21 23:51 ` Junio C Hamano
2012-09-22 16:10 ` Michael J Gruber
2012-09-22 20:23 ` Junio C Hamano
2012-09-23 15:07 ` Michael J Gruber
2012-09-25 0:42 ` Jeff King
2012-09-25 7:24 ` Michael J Gruber
2012-09-25 0:38 ` Jeff King
2012-09-25 16:19 ` Junio C Hamano
2012-09-22 4:51 ` Junio C Hamano
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=20120921233723.GA29433@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jjensen@workspacewhiz.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).