Thread (3 messages) 3 messages, 2 authors, 2016-06-15

Re: [PATCH] Handle "git show" output correctly.

From: Peter Jones <pjones@redhat.com>
Date: 2016-06-15 22:54:44

Possibly related (same subject, not in this thread)

On Wed, 2012-09-12 at 17:40 +0200, Matthieu Moy wrote:
How does this react to multi-line subject, e.g

This should be the
subject line.

And this is the body.

?

git format-patch will merge the lines in a single Subject: header, and
your version seems to take only the first line.

A test showing this would be welcome. 
An updated patch to fix this will be my next mail.  It's not as succinct
as it once was, but such is life.

The two attached commits to this message can be used as a test case.
Basically, do (in any repo)

git am 0001* 0002*
git show > foo.patch
git reset HEAD^ --hard
git am foo.patch
git show # check the output here
git format-patch -1
# check 0001-bar-bar-bar-this-is-a-very-very-long-line-I-am-tired.patch
# here.

It winds up merging the subject lines before the rest of git-am does - I
couldn't get it to work if I preserved the newline; for some reason I
always get a second newline and that's /more/ wrong.

-- 
  Peter

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help