From: Ramkumar Ramachandra Date: Thu, 4 Aug 2011 10:39:01 +0000 (+0530) Subject: revert: Simplify and inline add_message_to_msg X-Git-Tag: v1.7.8-rc0~141^2~16 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/be33c46cda2cd74344d338150019cbabd88df12f?ds=inline;hp=be33c46cda2cd74344d338150019cbabd88df12f revert: Simplify and inline add_message_to_msg The add_message_to_msg function has some dead code, an unclear API, only one callsite. While it originally intended fill up an empty commit message with the commit object name while picking, it really doesn't do this -- a bug introduced in v1.5.1-rc1~65^2~2 (Make git-revert & git-cherry-pick a builtin, 2007-03-01). Today, tests in t3505-cherry-pick-empty.sh indicate that not filling up an empty commit message is the desired behavior. Re-implement and inline the function accordingly, with a beneficial side-effect: don't dereference a NULL pointer when the commit doesn't have a delimeter after the header. Helped-by: Junio C Hamano Mentored-by: Jonathan Nieder Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano ---