From: Jonathan Nieder Date: Fri, 09 Dec 2011 19:47:27 GMT Subject: Re: [PATCH 4/9] revert: simplify getting commit subject in format_todo() Message-ID: <20111209194727.GF20913@elie.hsd1.il.comcast.net> In-Reply-To: <1323445326-24637-5-git-send-email-artagnon@gmail.com> Ramkumar Ramachandra wrote: > format_todo() calls get_message(), but uses only the subject line of > the commit message. As a minor optimization, save work and > unnecessary memory allocations by using find_commit_subject() instead. Nice. Thanks for explaining. > Also, remove the unnecessary check on cur->item: the previous patch > makes sure that instruction sheets with missing commit subjects are > parsable. I guess you mean the check that cur->item->buffer is non-NULL. But now I am confused --- what would that have to do with instruction sheets with missing commit subjects? If cur->item->buffer is NULL, isn't find_commit_subject going to segfault regardless? Can cur->item->buffer be NULL?