Re: [PATCH 2/3] add--interactive: add builtin helper for interactive add

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

 



Hi,

On Fri, 5 May 2017, Ævar Arnfjörð Bjarmason wrote:

>  int cmd_add_interactive__helper(int argc, const char **argv, const char *prefix)
>  {
> -	int i, found_opt = 0;
> -
> -	git_config(git_add_interactive_config, NULL);
> +	int opt_status = 0;
>  
> -	for (i = 1; i < argc; i++) {
> -		const char *arg = argv[i];
> +	struct option options[] = {
> +		OPT_BOOL(0, "status", &opt_status,
> +			 N_("print status information with diffstat")),

Please use OPT_CMDMODE() instead; it was invented exactly for this kind of
scenario.

> -- 
> 2.11.0

Really? ;-)

Ciao,
Dscho

[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]