Subject: Re: [PATCH v3 5/6] config: select .git/common/config with --repo

From: Max Kirillov <[email-masked]>
Date: Sun, 31 Jan 2016 00:10:10 +0200

On Tue, Jan 26, 2016 at 06:44:44PM +0700, Nguyễn Thái Ngọc Duy wrote:
> This new option allows the user to write to or read from
> .git/common/config in worktree v1. In worktree v0, --repo is an alias
> of --local.

Looks like by default a value is always set in a local
config, which might be dangerous for remote.* or gc.*
parameters, for example. I think that even if reading is
done uniformly setting could depend on the actual variable
being set if no location specified.

>  	if (use_global_config + use_system_config + use_local_config +
> -	    !!given_config_source.file + !!given_config_source.blob > 1) {
> +	    !!given_config_source.file + !!given_config_source.blob > 1 +
> +	    use_repo_config) {
>  		error("only one config file at a time.");

Shouldn't "+ use_repo_config" do here to the left part of
comparison?

-- 
Max