Consider the case that a project is cloned on two different platform, one which supports reflinks and the other only supports copying. Currently, dvc config cache.type copy would be committed to git and be used on both systems although one of them can enjoy a much smarter linking.
In other words, the cache type (and maybe other configurations) are local to the environment and should not be part of the .dvc/config which is committed to git.
@drorata You could use .dvc/config.local for that. Just use --local flag when configuring your link type. Works for other config options too.
That makes a lot of sense! Thanks for the pointer. Maybe it is worthy to mention in the docs of cache.type that it is recommended to use the --local flag for the config?
@drorata there is an even simpler solution to this, I believe. You can set a comma separated list of cache types - DVC'll be trying them one by one. E.g.:
reflink,copy - means try reflinks, if they are not available, go with copy.
You can combine any link types like this.
Closing. Docs issue https://github.com/iterative/dvc.org/issues/1368 . Thanks again for the feedback @drorata !
Most helpful comment
@drorata You could use
.dvc/config.localfor that. Just use--localflag when configuring your link type. Works for other config options too.