Re: [PATCH v3 5/6] config: select .git/common/config with --repo
- From
Max Kirillov <max@max630.net>
- Date
- Jan 30, 2016, 22:10 UTC
- Message-ID
- <20160130221010.GD4978@wheezy.local>
- In-Reply-To
- <1453808685-21235-6-git-send-email-pclouds@gmail.com>
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.
Show 5 quoted lines
> 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