Re: [PATCH 4/4] Implement git commit and status as a builtin commands.
- From
Kristian Høgsberg <krh@redhat.com>
- Date
- Nov 5, 2007, 18:57 UTC
- Message-ID
- <1194289073.13968.16.camel@hinata.boston.redhat.com>
- In-Reply-To
- <20071103150637.GA11172@atjola.homenet>
On Sat, 2007-11-03 at 16:06 +0100, Björn Steinbrink wrote:
Show 5 quoted lines
> On 2007.11.02 11:33:09 -0400, Kristian Høgsberg wrote:
> > + if (all && interactive)
> > + die("Cannot use -a, --interactive or -i at the same time.");
>
> Shouldn't that be "if (all && (interactive || also))"?The shell script just has
case "$all,$interactive,$also,$#" in
*t,*t,*)
die "Cannot use -a, --interactive or -i at the same time." ;;which doesn't seem to care about the value of $also. As far as I understand git commit, it doesn't make sense to pass any of -a, -i, -o or --interactive at the same time so I guess I could join the checks
if (also && only)
die("Only one of --include/--only can be used.");
if (all && interactive)
die("Cannot use -a, --interactive or -i at the same
time.");into something like
if (also + only + all + interactive > 1)
die("Only one of --include/--only/--all/--interactive can be used.");Does that sound right?
Kristian