Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 4/5] Full rework of quote_c_style and write_name_quoted.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:35

David Kastrup [off-list ref] writes:
Pierre Habouzit [off-list ref] writes:
quoted
On Wed, Sep 19, 2007 at 08:08:02AM +0000, Andreas Ericsson wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help