Re: [PATCH 02/17] revert: Inline add_message_to_msg function
Hi Junio,
Junio C Hamano writes:
Show 11 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>> The strstr(msg.message, "\n\n") actually stops after the 0 in the
>> committer line. It's trying to find out where the commit message
>> actually begins. I even created a commit using commit-tree (not using
>> porcelain), but it's impossible to find a msg.message that doesn't
>> have a "\n\n" -- even one with an empty commit message looks like:
>> ...
>
> ... with current git, sure, but I think the code to check for "just in
> case we didn't find \n\n" is there because prehistoric versions of git
> could write such a commit object.
> I would prefer to have if (p) { ... } around the two lines below.
>
>> + p += 2;
>> + strbuf_addstr(&msgbuf, p);