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

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.

Previous: David KastrupNext: David Kastrup
Message 26 of 29 in “let's refactor quoting ...”
  1. Pierre HabouzitSep 18, 2007
  2. 1/5 strbuf API additions and enhancements.Pierre Habouzit, Sep 18, 2007
  3. Edgar ToernigSep 19, 2007
  4. Pierre HabouzitSep 19, 2007
  5. Junio C HamanoSep 19, 2007
  6. Johannes SixtSep 20, 2007
  7. Kalle Olavi NiemitaloSep 20, 2007
  8. Jeff KingSep 20, 2007
  9. 2/5 sq_quote_argv and add_to_string rework with strbuf's.Pierre Habouzit, Sep 18, 2007
  10. Junio C HamanoSep 19, 2007
  11. Pierre HabouzitSep 19, 2007
  12. 3/5 Rework unquote_c_style to work on a strbuf.Pierre Habouzit, Sep 18, 2007
  13. Pierre HabouzitSep 19, 2007
  14. Junio C HamanoSep 19, 2007
  15. Pierre HabouzitSep 19, 2007
  16. 5/5 Avoid duplicating memory, and use xmemdupz instead of xstrdup.Pierre Habouzit, Sep 18, 2007
  17. 4/5 Full rework of quote_c_style and write_name_quoted.Pierre Habouzit, Sep 18, 2007
  18. Pierre HabouzitSep 19, 2007
  19. Junio C HamanoSep 19, 2007
  20. Pierre HabouzitSep 19, 2007
  21. Andreas EricssonSep 19, 2007
  22. Pierre HabouzitSep 19, 2007
  23. Andreas EricssonSep 19, 2007
  24. Pierre HabouzitSep 19, 2007
  25. David KastrupSep 19, 2007
  26. Junio C HamanoSep 19, 2007
  27. David KastrupSep 19, 2007
  28. Junio C HamanoSep 19, 2007
  29. Pierre HabouzitSep 19, 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.