Re: [PATCH v7] commit: add a commit.verbose config variable

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

 



Pranit Bauva <pranit.bauva@xxxxxxxxx> writes:

> First one to introduce a new variable `config_verbose` to store the
> value read by the config. Till then the value of verbose can be set
> through command line options. Depending on the situation as you
> described, it can then make the modification. Another approach would
> be to swap the places where the configuration file is read and where
> arguments are parsed. I personally think the first approach as more
> appropriate as in the latter one, there might be some parts of code
> which can break.

Changing config-first-and-then-command-line is likely to break
things, unless you do a lot more work to avoid breakage ;-)

Wouldn't it be the simplest to do:

 * initialize opt-verbose to "unspecified";
 * initialize config-verbosity to "unspecified";
 * let git_config() update config-verbosity;
 * let parse_options() update opt-verbose.

and then

 * if opt-verbose is still "unspecified", then overwrite it with
   config-verbosity.

 * if opt-verbose is still "unspecified" after that, then neither
   the command line nor the configuration gave you verbosity.

 * otherwise opt-verbose at this point has what verbosity level to
   use.

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