While working on
https://github.com/iterative/dvc/pull/4005/files#diff-4e77f428386b79da1346596c02adbccbL56
we found a test that was pretty much force git adding a file that is gitignored and tracked by dvc:
erepo_dir.dvc_gen("version", "updated")
erepo_dir.scm.add(["version", "version.dvc"])
erepo_dir.scm.commit("upgrade to DVC tracking")
new_rev = erepo_dir.scm.get_rev()
we do check for such things when we dvc add/run/etc(basically whenever we save() the output), but we don't check for that after the fact, which might result in that output being constantly dirty from dvc standpoint (e.g. it has one md5, even though another one is recorded into out.dvc).
This doesn't happen unless the user done something like git add -f out to overcome .gitignore, so the chances of this happening are pretty slim, but it might result in some unexpected situations, so we should consider introducing additional checks to warn/prevent this from happening.
Kudos @pmrowla for the research.
While working on
https://github.com/iterative/dvc/pull/4005/files#diff-4e77f428386b79da1346596c02adbccbL56
we found a test that was pretty much force
git adding a file that is gitignored and tracked by dvc:we do check for such things when we
dvc add/run/etc(basically whenever wesave()the output), but we don't check for that after the fact, which might result in that output being constantly dirty from dvc standpoint (e.g. it has one md5, even though another one is recorded intoout.dvc).This doesn't happen unless the user done something like
git add -f outto overcome.gitignore, so the chances of this happening are pretty slim, but it might result in some unexpected situations, so we should consider introducing additional checks to warn/prevent this from happening.Kudos @pmrowla for the research.