git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Making format-patch output better when blank line is missing?
@ 2009-01-17 12:35 Adeodato Simó
  2009-01-17 15:47 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Adeodato Simó @ 2009-01-17 12:35 UTC (permalink / raw)
  To: git

Hello,

I'm using git-format-patch to send commit diff emails, and it was
recently brought to my atention that if a commit message consists
entirely in a paragraph with no blank lines (particluarly, no blank line
after the first line, which is not a summary but just the first line of
the paragraph), git-format-patch will place all the commit message in
the Subject, which is inconvenient to read.

Do you think it would be good to have format-patch do something like
this in this case?:

    Subject: [PATCH] This commit introduces a new function bla() that [...]

    [...] makes it possible to apply the frobniz operation to objects
    that don't bla bla bla bla.

(I realize that, with this, the applying logic would have to learn about
it. Hm.)

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
- I love you, Shirley, I'm not ashamed to say.
- If you love me, then you'll want me to be happy. Even if I'm not with you.
- I don't love you that much.
                -- Denny Crane and Shirley Schmidt

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] Making format-patch output better when blank line is missing?
  2009-01-17 12:35 [RFC] Making format-patch output better when blank line is missing? Adeodato Simó
@ 2009-01-17 15:47 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2009-01-17 15:47 UTC (permalink / raw)
  To: Adeodato Simó; +Cc: git

On Sat, Jan 17, 2009 at 01:35:45PM +0100, Adeodato Simó wrote:

> I'm using git-format-patch to send commit diff emails, and it was
> recently brought to my atention that if a commit message consists
> entirely in a paragraph with no blank lines (particluarly, no blank line
> after the first line, which is not a summary but just the first line of
> the paragraph), git-format-patch will place all the commit message in
> the Subject, which is inconvenient to read.

Yeah, such messages don't really interact well with the idea of a
subject/body commit format.

> Do you think it would be good to have format-patch do something like
> this in this case?:
> 
>     Subject: [PATCH] This commit introduces a new function bla() that [...]
> 
>     [...] makes it possible to apply the frobniz operation to objects
>     that don't bla bla bla bla.
> 
> (I realize that, with this, the applying logic would have to learn about
> it. Hm.)

I think it would be more readable to simply limit the subject line, add
"...", and then repeat the whole paragraph in the body. Then worst case,
the person applying just gets the text repeated, like:

  This commit introduces a new function bla() that...

  This commit introduces a new function bla() that makes it possible to
  aply the forbniz operation to objects that don't bla bla bla bla.

which is actually pretty reasonable. And best case, the person applying
fixes it up appropriately. But I don't know if it is worth trying to
come up with a reversible format. Patches sent through email are meant
to preserve what's on the other end, but it doesn't _have_ to be exact,
especially in the face of somebody ignoring the workflow conventions
that the patch format is meant to support.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-17 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 12:35 [RFC] Making format-patch output better when blank line is missing? Adeodato Simó
2009-01-17 15:47 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).