Thread (20 messages) flat view 20 messages, 6 authors, 2016-06-15

Re: [PATCH 4/4] Implement git commit and status as a builtin commands.

From: Kristian Høgsberg <hidden>
Date: 2016-06-15 22:43:47

On Sat, 2007-11-03 at 16:06 +0100, Björn Steinbrink wrote:
On 2007.11.02 11:33:09 -0400, Kristian Høgsberg wrote:
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help