Re: [PATCH 4/5] Full rework of quote_c_style and write_name_quoted.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 19, 2007, 08:31 UTC
- Message-ID
- <7vwsunoy3d.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <86r6kv2h64.fsf@lola.quinscape.zz>
David Kastrup <dak@gnu.org> writes:
Show 22 quoted lines
> Pierre Habouzit <madcoder@debian.org> writes: > >> On Wed, Sep 19, 2007 at 08:08:02AM +0000, Andreas Ericsson wrote: >>> Then perhaps a separate patch for this would have been prudent? I'm not >>> against the change per se and I understand the reasoning behind it, but >>> it seems to go against Documentation/SubmittingPatches (submit one change >>> at a time). >> >> Yes, the thing is, I wrote it in one piece, and had a _very_ hard time >> splitting it. The aggregated patches had almost no chunks, and editing >> diffs by hand isn't what I like to do :) > > Use Emacs for it. After loading the patch in a file, type > > Esc x diff-mode RET > > If you now move to a place in the middle of a hunk and type C-c C-s, > the hunk is split at that point into two hunks. C-c C-k kills the > current hunk. C-x C-s saves the file, C-x C-c exits Emacs. > > In that manner throwing selected material out of a patch is rather > straightforward, even when it is in the middle of a hunk.
Be careful when you edit format-patch output. It seems that diff-mode tends to mistake the trailing "signature separator" at the end as if it is a removal of a line from the preimage, and editing the last hunk ends up miscalculating the number of lines in it. It might have been fixed in the latest version but I was burned by it number of times.