Re: git log -S not finding all commits?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git log -S not finding all commits?

From: Randal L. Schwartz <hidden>
Date: 2016-06-15 22:47:29

quoted
quoted
quoted
quoted
"Matthieu" == Matthieu Moy [off-list ref] writes:
Matthieu> merlyn@stonehenge.com (Randal L. Schwartz) writes:
quoted
quoted
quoted
quoted
quoted
quoted
"Matthieu" == Matthieu Moy [off-list ref] writes:
Matthieu> Matthieu Moy [off-list ref] writes:
quoted
quoted
quoted
git log -p --format="%s\n%x00"  | perl -0 -ne 'print if(/whatever-you-search/);'
That "if" is noisier than it needs to be:

perl -0 -ne 'print if /this/'
Matthieu> Also, this seems to actually print the \0 character. Perhaps a perl
Matthieu> guru can give a simple solution to replace the \0 by a \n?

Just a matter of one more switch.  Sorry for forgetting it earlier.

  .. | perl -ln0e 'print if /this/'

print "Just another Perl hacker,"; # the original

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[off-list ref] <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

Re: git log -S not finding all commits?

From: Scott Wiersdorf <hidden>
Date: 2016-06-15 22:47:29

On Fri, Oct 09, 2009 at 07:07:02AM -0700, Randal L. Schwartz wrote:
Just a matter of one more switch.  Sorry for forgetting it earlier.

  .. | perl -ln0e 'print if /this/'
And I thought mine was a pretty tidy response... You *are* Japh.

Scott
-- 
Scott Wiersdorf
[off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help