From: Ramkumar Ramachandra Date: Tue, 19 Jul 2011 17:08:38 GMT Subject: Re: [PATCH 02/17] revert: Inline add_message_to_msg function Message-ID: In-Reply-To: <7vfwm29pqz.fsf@alter.siamese.dyndns.org> Hi Junio, Junio C Hamano writes: > Ramkumar Ramachandra 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. Ah, I see :) > I would prefer to have if (p) { ... } around the two lines below. > >> +               p += 2; >> +               strbuf_addstr(&msgbuf, p); Done. Thanks. -- Ram