Re: [PATCH 4/9] revert: simplify getting commit subject in format_todo()
Hi,
Jonathan Nieder wrote:
> Ramkumar Ramachandra wrote:
> [...]
> Can cur->item->buffer be NULL?
As Junio correctly points out in $gmane/186365, no. To quote him:
parse_insn_line() uses lookup_commit_reference() which
calls parse_object() on the object name (and if it is a tag, deref_tag()
will parse the tagged object until we see something that is not a tag), so
we know cur->item is parsed before we see it
Show 6 quoted lines
>> Also, remove the unnecessary check on cur->item: the previous patch
>> makes sure that instruction sheets with missing commit subjects are
>> parsable.
>
> But now I am confused
> [...]
This part of the commit message is simply awful. Replaced with:
Also remove the unnecessary check on cur->item->buffer:
the lookup_commit_reference() call in parse_insn_line() has already
made sure of this.
-- Ram