git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git cherry-pick: Add NULL check to sequencer parsing of HEAD

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
May 3, 2012, 12:26 UTC
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:
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 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é
Previous: Neil HormanNext: Neil Horman
Message 4 of 9 in “git cherry-pick: Add NULL check to sequencer parsing of HEAD”
  1. git cherry-pick: Add NULL check to sequencer parsing of HEADNeil Horman, May 3, 2012
  2. René ScharfeMay 3, 2012
  3. Neil HormanMay 3, 2012
  4. René ScharfeMay 3, 2012
  5. git cherry-pick: Add NULL check to sequencer parsing of HEADNeil Horman, May 3, 2012
  6. git cherry-pick: Add NULL check to sequencer parsing of HEADNeil Horman, May 3, 2012
  7. Matthieu MoyMay 3, 2012
  8. Junio C HamanoMay 3, 2012
  9. Neil HormanMay 3, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.