Re: Quickly searching for a note

2012-09-25 Thread Michael J Gruber
Jeff King venit, vidit, dixit 25.09.2012 02:42: On Sun, Sep 23, 2012 at 05:07:04PM +0200, Michael J Gruber wrote: If we linked with an embeddable scripting language interpreter (e.g. lua, tcl, guile, ...), it may be a more practical enhancement, though. Yes, the idea is extend, don't

Re: Quickly searching for a note

2012-09-25 Thread Junio C Hamano
Jeff King p...@peff.net writes: Agreed. I just posted a patch series that gives you --pretty lua support, though I haven't convinced myself it's all that exciting yet. I think it would be nicer for grepping, where the conditionals read more like regular code. Something like: git log

Re: Quickly searching for a note

2012-09-24 Thread Jeff King
On Sat, Sep 22, 2012 at 01:23:56PM -0700, Junio C Hamano wrote: Michael J Gruber g...@drmicha.warpmail.net writes: On my mental scratch pad (yeah, that's where the bald spots are) I have the following more general idea to enhance the revision parser: --limit-run=script::

Re: Quickly searching for a note

2012-09-24 Thread Jeff King
On Sun, Sep 23, 2012 at 05:07:04PM +0200, Michael J Gruber wrote: If we linked with an embeddable scripting language interpreter (e.g. lua, tcl, guile, ...), it may be a more practical enhancement, though. Yes, the idea is extend, don't embed the other way round, so to say. I still

Re: Quickly searching for a note

2012-09-23 Thread Michael J Gruber
Junio C Hamano venit, vidit, dixit 22.09.2012 22:23: Michael J Gruber g...@drmicha.warpmail.net writes: On my mental scratch pad (yeah, that's where the bald spots are) I have the following more general idea to enhance the revision parser: --limit-run=script:: --run=script::: These

Re: Quickly searching for a note

2012-09-22 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: On my mental scratch pad (yeah, that's where the bald spots are) I have the following more general idea to enhance the revision parser: --limit-run=script:: --run=script::: These options run the script `script` on each revision that is

Quickly searching for a note

2012-09-21 Thread Joshua Jensen
Background: To tie Perforce changelists to Git commits, I add a note to a commit with the form P4@123456. Later, I use the note to sync down the closest Perforce changelist matching the Git commit. I search for these notes by getting a list of revisions: git rev-list --max-count=1000

Re: Quickly searching for a note

2012-09-21 Thread Andreas Schwab
Joshua Jensen jjen...@workspacewhiz.com writes: Background: To tie Perforce changelists to Git commits, I add a note to a commit with the form P4@123456. Later, I use the note to sync down the closest Perforce changelist matching the Git commit. I search for these notes by getting a list of

Re: Quickly searching for a note

2012-09-21 Thread Junio C Hamano
Joshua Jensen jjen...@workspacewhiz.com writes: Background: To tie Perforce changelists to Git commits, I add a note to a commit with the form P4@123456. Later, I use the note to sync down the closest Perforce changelist matching the Git commit. I search for these notes by getting a list of

Re: Quickly searching for a note

2012-09-21 Thread Joshua Jensen
- Original Message - From: Junio C Hamano Date: 9/21/2012 11:21 AM Joshua Jensen jjen...@workspacewhiz.com writes: Background: To tie Perforce changelists to Git commits, I add a note to a commit with the form P4@123456. Later, I use the note to sync down the closest Perforce

Re: Quickly searching for a note

2012-09-21 Thread Joshua Jensen
- Original Message - From: Andreas Schwab Date: 9/21/2012 9:10 AM Joshua Jensen jjen...@workspacewhiz.com writes: Background: To tie Perforce changelists to Git commits, I add a note to a commit with the form P4@123456. Later, I use the note to sync down the closest Perforce

Re: Quickly searching for a note

2012-09-21 Thread Junio C Hamano
Joshua Jensen jjen...@workspacewhiz.com writes: Is there any particular reason you do that as two separate steps? It would feel more natural, at least to me, to do something along the lines of git log --show-notes=p4notes -1000 Thanks for the reply. I did not make clear above that

Re: Quickly searching for a note

2012-09-21 Thread Joshua Jensen
- Original Message - From: Junio C Hamano Date: 9/21/2012 2:04 PM Joshua Jensen jjen...@workspacewhiz.com writes: Is there any particular reason you do that as two separate steps? It would feel more natural, at least to me, to do something along the lines of git log

Re: Quickly searching for a note

2012-09-21 Thread Johannes Sixt
Am 21.09.2012 22:25, schrieb Joshua Jensen: - Original Message - From: Junio C Hamano Date: 9/21/2012 2:04 PM Joshua Jensen jjen...@workspacewhiz.com writes: Is there any particular reason you do that as two separate steps? It would feel more natural, at least to me, to do something

Re: Quickly searching for a note

2012-09-21 Thread Joshua Jensen
- 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

Re: Quickly searching for a note

2012-09-21 Thread Junio C Hamano
Jeff King p...@peff.net writes: 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

Re: Quickly searching for a note

2012-09-21 Thread Junio C Hamano
Joshua Jensen jjen...@workspacewhiz.com writes: Background: To tie Perforce changelists to Git commits, I add a note to a commit with the form P4@123456. Later, I use the note to sync down the closest Perforce changelist matching the Git commit. I noticed that nobody brought this up, but