From: René Scharfe Date: Thu, 03 May 2012 12:26:46 GMT Subject: Re: [PATCH] git cherry-pick: Add NULL check to sequencer parsing of HEAD Message-ID: <4FA27986.7010502@lsrfire.ath.cx> In-Reply-To: <20120503120857.GA3085@hmsreliant.think-freely.org> Am 03.05.2012 14:08, schrieb Neil Horman: >>> + 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 user Sorry, 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é