How to split and edit patches

patchvim

Sometimes I need to split a big patch into smaller (disjoint) ones, e.g. for every separate feature included.

Usually I do it via standard vim yank/dd commands and split-window switching.

But are there some tools/vim-tricks to help with such kind of editing?

For example support for commands like: move the 3 next complete hunks to right opened patch file

Best Answer

You might want to take a look into patchutils [1]. For the vim part, I wrote a small vim plugin that helps with navigating in patches: diff_navigator [2].

[1] http://cyberelk.net/tim/software/patchutils/

[2] http://www.vim.org/scripts/script.php?script_id=2361

Related Question