Re: [PATCH v3 5/6] config: select .git/common/config with --repo
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 1, 2016, 05:15 UTC
- Message-ID
- <CACsJy8Av6W3S2S+eEi=X_V1TSBYp_t4wdRn_dvrtKiS3aS_=7g@mail.gmail.com>
- In-Reply-To
- <20160130221010.GD4978@wheezy.local>
On Sun, Jan 31, 2016 at 5:10 AM, Max Kirillov <max@max630.net> wrote:
Show 10 quoted lines
> 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.
I grepped "git config" in scripts to see if we need to change any to use --repo, but I forgot about builtin commands. git-remote needs to store remote.* in the shared config file instead.
gc.* and others are set manually by the user, so they decide. We can have a user-controlled filter that catches certain variables and suggests they are stored in shared config instead, but this is optional.
-- Duy