splitting large patch files into smaller ones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recently had an occasion to take a rather large git-diff patch, and split
it into smaller chunks.  This was so I can more easily import the patches
into guilt, then reorder, rename, shuffle, and join individual patch
snippets into logical patches (i.e., one patch per topic).

I was looking around for a tool that would allow me to split a large patch
file into individual snippets and couldn't find one.  So I wrote one in
perl.  It takes a patch file and creates individual small files, one for
each combination of a filename listed in the patch, and a patch snippet
(starting with an '@@' line).  Each '@@' snippet gets an index number and a
new filename, prefixed with the appropriate header ("diff ...", ---, and +++
lines) so it's a valid patch file on its own.

Questions:

1. Does anyone know of such a tool, perhaps written in C for better speed?

2. If not, is there any interest in such a tool?  If there's interest, I'd
   be happy to cleanup my perl script and contribute it to
   git/guilt/whatever.

Cheers,
Erez.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux