Re: [PATCH 10/9 v4] difftool: fix regression in '--prompt' options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Henigan <tim.henigan@xxxxxxxxx> writes:

> +# the '--prompt' and '--no-prompt' options require special treatment
> +# because they may be specified more than once...the last one "wins".
> +for (@ARGV) {
> +	if (($_ eq "-y") or ($_ eq "--no-prompt")) {
> +		$prompt = 0;
> +	} elsif ($_ eq "--prompt") {
> +		$prompt = 1;
> +	} else {
> +		push(@diffargs, $_);
> +	}
> +}

I really do not like the direction in which this series is going.  We do
not have a similar --no-gui option to defeat --gui option that may appear
earlier on the command line, but when we fix that bug (isn't it a bug?),
we would have to teach this loop about that option, wouldn't we?

In the end, won't you end up resurrecting the argument parsing loop that
you got rid of with the first patch in your series?  Isn't this working
around the problem introduced only because you are using Getopt::Long and
hitting its limitations?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]