Re: [PATCH v2] imap-send: Use parse options API to determine verbosity

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

 



Bernhard Reiter <ockham@xxxxxxxxx> writes:

> Signed-off-by: Bernhard Reiter <ockham@xxxxxxxxx>
> ---
> In reply to <xmqqk339ibal.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx>.
>
> Thanks for bearing with me. I should've given the corresponding verbosity
> values more thought myself in the first place.

The original defined and even used these two variables, but as far
as I can tell they were always set to 0 and nobody modified them.
Hence, we would be OK as long as the end result will behave the same
as before without any -v/-q from the command line ;-)

Thanks.  This version looks more sensible.

> -	if (argc != 1)
> -		usage(imap_send_usage);
> -
>  	setup_git_directory_gently(&nongit_ok);
>  	git_imap_config();
>  
> +	argc = parse_options(argc, (const char **)argv, "", imap_send_options, imap_send_usage, 0);
> +

... except we might want to check argc here and say something about
missing or excess parameters, which was lost in the change in this
hunk.  I think (without giving it a real thought, though ;-) you
would expect that nothing remains on the command line after
parse_options() has done its thing, no?


>  	if (!server.port)
>  		server.port = server.use_ssl ? 993 : 143;
--
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]