Re: [PATCH 02/17] revert: Inline add_message_to_msg function

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

 



Hi Junio,

Junio C Hamano writes:
> Ramkumar Ramachandra <artagnon@xxxxxxxxx> 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
--
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]