Re: Re* [GIT PULL] sh updates for 2.6.25

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
[cut]

> So in short, when you use "am", it by design unfolds the "Subject: " line
> and there is no bug there.  "rebase" being implemented in terms of
> "format-patch piped to am" does mangle the message because of this, but
> if anything that is a bug in rebase, and not "am".
> 
> And this is a potential fix to the issue, which was made possible only
> because recently "rebase" started passing an extra option to "am".
> 
> -- >8 --
> From: Junio C Hamano <gitster@xxxxxxxxx>
> Date: Wed, 16 Apr 2008 12:50:48 -0700
> Subject: [PATCH] rebase: do not munge commit log message
> 
> Traditionally git-rebase was implemented in terms of "format-patch" piped
> to "am -3", to strike balance between speed (because it avoids a rather
> expensive read-tree/merge-recursive machinery most of the time) and
> flexibility (the magic "-3" allows it to fall back to 3-way merge as
> necessary).  However, this combination has one flaw when dealing with a
> nonstandard commit log message format that has more than one lines in the
> first paragraph, because such a "first line" is formatted as logically a
> single line, and unfolded at the applying end.
> 
> This teaches "git am --rebasing" to take advantage of the fact that the
> mbox message "git rebase" prepares for it records the original commit
> object name, and that such a commit _is_ available locally.  It reads the
> log message from the original commit object instead.

IIRC there was alternate patch which made git-format-patch to add extra
email header meant for git-am to "obey the (encoded) commit message
formatting."

But this solution is simpler, and I think better.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux