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

Re: [PATCH 7/8] config: Don't return negative exit codes.

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 15, 2009, 12:22 UTC
Message-ID
<alpine.DEB.1.00.0902151321310.10279@pacific.mpi-cbg.de>
In-Reply-To
<1234688460-9248-7-git-send-email-felipe.contreras@gmail.com>
Hi,
On Sun, 15 Feb 2009, Felipe Contreras wrote:
Show 9 quoted lines
>  	else if (actions & ACTION_RENAME_SECTION) {
> -		int ret;
>  		check_argc(argc, 2, 2);
>  		ret = git_config_rename_section(argv[0], argv[1]);
> -		if (ret < 0)
> -			return ret;
>  		if (ret == 0)
>  			die("No such section!");
>  	}
You need an "if (ret > 0) ret = 0;" to avoid regressions.
Show 9 quoted lines
>  	else if (actions & ACTION_REMOVE_SECTION) {
> -		int ret;
>  		check_argc(argc, 1, 1);
>  		ret = git_config_rename_section(argv[0], NULL);
> -		if (ret < 0)
> -			return ret;
>  		if (ret == 0)
>  			die("No such section!");
>  	}
Likewise.

Thanks, Dscho

Previous: Felipe ContrerasNext: Felipe Contreras
Message 9 of 19 in “config: Trivial rename in preparation for parseopt.”
  1. 1/8 config: Trivial rename in preparation for parseopt.Felipe Contreras, Feb 15, 2009
  2. 2/8 config: Cleanup config file handling.Felipe Contreras, Feb 15, 2009
  3. 3/8 config: Use parseopt.Felipe Contreras, Feb 15, 2009
  4. 4/8 config: Improve variable 'type' handling.Felipe Contreras, Feb 15, 2009
  5. 5/8 config: Disallow multiple config file locations.Felipe Contreras, Feb 15, 2009
  6. 6/8 config: Don't allow extra arguments for -e or -l.Felipe Contreras, Feb 15, 2009
  7. 7/8 config: Don't return negative exit codes.Felipe Contreras, Feb 15, 2009
  8. 8/8 config: Codestyle cleanups.Felipe Contreras, Feb 15, 2009
  9. Johannes SchindelinFeb 15, 2009
  10. Felipe ContrerasFeb 15, 2009
  11. Felipe ContrerasFeb 15, 2009
  12. Johannes SchindelinFeb 15, 2009
  13. Felipe ContrerasFeb 15, 2009
  14. Felipe ContrerasFeb 15, 2009
  15. Johannes SchindelinFeb 15, 2009
  16. Felipe ContrerasFeb 15, 2009
  17. Felipe ContrerasFeb 15, 2009
  18. Jeff KingFeb 15, 2009
  19. Junio C HamanoFeb 16, 2009

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.