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