Bug 6344 - Some might find patch-grep useful
Summary: Some might find patch-grep useful
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-03 00:23 PST by Eric Seidel (no email)
Modified: 2008-01-13 14:51 PST (History)
2 users (show)

See Also:


Attachments
patch-grep in all its glory (3.89 KB, application/octet-stream)
2006-01-03 00:24 PST, Eric Seidel (no email)
no flags Details
patch-grep in all its glory (now with more spellcheck!) (3.90 KB, application/octet-stream)
2006-01-03 00:30 PST, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-01-03 00:23:53 PST
Some might find patch-grep useful

I wrote the attached script tonight for being able to do hunk-based greps of my patch collection.  Some 
might find this useful.  Perhaps we should even include it in CVS.  We'll see.
Comment 1 Eric Seidel (no email) 2006-01-03 00:24:53 PST
Created attachment 5436 [details]
patch-grep in all its glory
Comment 2 Eric Seidel (no email) 2006-01-03 00:26:44 PST
You can use this like so:

cat mypatch.patch | patch-grep -h -e XSL

and it will print all hunks from mypatch.patch which match XSL, it will print them with the proper headers, 
so that the resulting output could be applied elsewhere.

This is useful for pruning down large cleanup patches into manageable chunks.
Comment 3 Eric Seidel (no email) 2006-01-03 00:30:15 PST
Created attachment 5437 [details]
patch-grep in all its glory (now with more spellcheck!)