Re: [PATCH] git cherry-pick: Add NULL check to sequencer parsing of HEAD
Am 03.05.2012 14:08, schrieb Neil Horman:
Show 8 quoted lines
>>> + if (parse_commit(head_commit))
>>> return error(_("could not parse commit %s\n"),
>>> sha1_to_hex(head_commit->object.sha1));
>>
>> Note: parse_commit() can handle NULL, and it already reports error
>> details itself.
> No, it doesn't. parse_commit checks NULL already, true, but it just returns -1.
> No error message is provided to the userSorry, was too terse again: It handles NULL, without printing anything.
And it reports details for (other) errors. So you could return -1 if
parse_commit() returns non-zero and be done with it. Just saying.
René