git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: splitting large patch files into smaller ones

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 23, 2007, 09:43 UTC
Message-ID
<Pine.LNX.4.64.0708231042120.20400@racer.site>
In-Reply-To
<200708221929.l7MJTgiL012452@agora.fsl.cs.sunysb.edu>
Hi,
On Wed, 22 Aug 2007, Erez Zadok wrote:
Show 7 quoted lines
> 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.

You can do that with "git add -i" and with "git gui" AFAIK. I even started some code to split hunks in "git gui", but it was pointed out that that code was not complete, and I did not have time to finish it.

Ciao, Dscho

Previous: René Scharfe
Message 3 of 3 in “splitting large patch files into smaller ones”
  1. Erez ZadokAug 22, 2007
  2. René ScharfeAug 22, 2007
  3. Johannes SchindelinAug 23, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.