Re: [PATCH 2/2] Make gc a builtin.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 12, 2007, 02:11 UTC
- Message-ID
- <7vtzwrtdmx.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0703112332550.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
> And instead of die()ing, I'd rather do something like > > return (pack_refs || run_command_v_opt(argv_pack_refs, RUN_GIT_CMD) && > run_command_v_opt(argv_reflog_expire, RUN_GIT_CMD) && > run_command_v_opt(argv_repack, RUN_GIT_CMD) && > (prune || run_command_v_opt(argv_prune, RUN_GIT_CMD) && > run_command_v_opt(argv_rerere, RUN_GIT_CMD);
Gaaaaaaaah.
That may be valid C, but please do that as a sequence of separate statements.
if (we are told to pack-refs)
if (try to pack refs and find error)
goto failure;if (try to reflog expire and find error) goto failure;
...
return Ok;
failure:
return Error;