Skip to content

config: rename config.local to config.private #3670

@casperdcl

Description

@casperdcl

DVC's use of the terms repo, local, global, and system doesn't quite match partially matches Git's use, and this can cause confusion.

config term Git DVC notes
project (tracked) .dvc/config confusing, but ok
local .git/config .dvc/config.local confusing, but ok
global ~/.gitconfig ~/.config/dvc/config ok
system /etc/gitconfig /etc/dvc.config ok
write/set defaults to local (untracked) defaults to project (tracked) confusing, but ok
read/get all locations all locations ok

Issues:

  1. commands (e.g. dvc config; dvc remote list) don't expose an explicit --project functionality fixed by ref: add config --project flag and standardize the others dvc.org#2064
  2. confusing: writing config is by default untracked (local) in Git but tracked (project) in DVC
  3. confusing file name convention: what Git calls local is what DVC calls project
  4. confusing file name convention: what DVC calls local is not what Git calls local
  5. what DVC calls local is what would be manually edited by super advanced users in Git (e.g. .git/info/exclude, .git/hooks/)

Example which would be super confusing for Git users:

$ dvc remote list --local
hello      http://world
$ dvc remote list --global
$ dvc remote list --system
$ dvc remote list
hello      http://world
surprise   http://where/did/this/come/from

I'd suggest in the first instance renaming dvc config --local to dvc config --private or similar. Later (after people get used to this breaking change), consider re-adding --local but with a different meaning (i.e. repo) to match Git.

Alternatively we could just expose a new --preoject flag. That wouldn't solve the long term confusion problem caused by the Git dichotomy, but at least it would expose the same functionality. fixed by treeverse/dvc.org#2064

CC @iterative/engineering

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionrequires active participation to reach a conclusionfeature requestRequesting a new featurep3-nice-to-haveIt should be done this or next sprintuiuser interface / interaction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions