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

Re: [PATCH] builtin-apply: Show a more descriptive error on failure when opening a patch

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 14, 2008, 14:33 UTC
Message-ID
<alpine.DEB.1.00.0804141532390.28504@racer>
In-Reply-To
<1208183018-27887-1-git-send-email-albertito@gmail.com>
Hi,
On Mon, 14 Apr 2008, Alberto Bertogli wrote:
Show 5 quoted lines
> +		if (fd < 0) {
> +			error("can't open patch '%s': %s", arg,
> +					strerror(errno));
> +			return 1;
> +		}

Do you absolutely want to retain the curly braces, and have two statements? I would prefer "return error(...)", and if you absolutely insist on a return 1: "return !!error(...)".

Ciao, Dscho

Previous: Alberto BertogliNext: Alberto Bertogli
Message 4 of 7 in “builtin-apply: Show a more descriptive error on failure when opening a patch”
  1. builtin-apply: Show a more descriptive error on failure when opening a patchAlberto Bertogli, Apr 13, 2008
  2. Junio C HamanoApr 13, 2008
  3. builtin-apply: Show a more descriptive error on failure when opening a patchAlberto Bertogli, Apr 14, 2008
  4. Johannes SchindelinApr 14, 2008
  5. builtin-apply: Show a more descriptive error on failure when opening a patchAlberto Bertogli, Apr 14, 2008
  6. Junio C HamanoApr 16, 2008
  7. Johannes SchindelinApr 14, 2008

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.