Dvc: Linking type should not be committed to git

Created on 29 Apr 2020  路  4Comments  路  Source: iterative/dvc

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.

Ref

awaiting response feature request p2-medium

Most helpful comment

@drorata You could use .dvc/config.local for that. Just use --local flag when configuring your link type. Works for other config options too.

All 4 comments

@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 !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ynop picture ynop  路  41Comments

Suor picture Suor  路  39Comments

dmpetrov picture dmpetrov  路  35Comments

kskyten picture kskyten  路  44Comments

drorata picture drorata  路  46Comments