Re: git log -S not finding all commits?
- From
Randal L. Schwartz <merlyn@stonehenge.com>
- Date
- Oct 9, 2009, 14:07 UTC
- Message-ID
- <864oq8r795.fsf@blue.stonehenge.com>
- In-Reply-To
- <vpq1vldx7xx.fsf@bauges.imag.fr>
>>>>> "Matthieu" == Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Matthieu> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>>> "Matthieu" == Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes: >>
Matthieu> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 5 quoted lines
>>>> 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 <merlyn@stonehenge.com> <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