I removed a dvc-file prior to committing anything, because I accidentally added the wrong file. Afterwards I was not able to remove the cached data.
Steps to reproduce:
dvc add example.txt
rm example.txt.dvc
dvc gc --all-commits (although the other modes of dvc gc are likely affected too)
Expected behavior:
The blob for example.txt is removed from .dvc/cache
Observed behavior:
The blob for example.txt remains in .dvc/cache
Version: 0.88
Platform: Windows 10 x64, exe installation
Notes:
-
The unit test for --all-commits doesn't cover a case where a dvc-file is removed before being committed. It only checks that when multiple versions of the dvc-file are present (with some committed into git), only versions that were committed are kept in cache. So it wouldn't have caught this issue.
-
Not sure if it's of any significance but in my case, an entry corresponding to my specific file in question remained in the state SQLite database.

I removed a dvc-file prior to committing anything, because I accidentally added the wrong file. Afterwards I was not able to remove the cached data.
Steps to reproduce:
dvc add example.txtrm example.txt.dvcdvc gc --all-commits(although the other modes ofdvc gcare likely affected too)Expected behavior:
The blob for example.txt is removed from .dvc/cache
Observed behavior:
The blob for example.txt remains in .dvc/cache
Version: 0.88
Platform: Windows 10 x64, exe installation
Notes:
The unit test for
--all-commitsdoesn't cover a case where a dvc-file is removed before being committed. It only checks that when multiple versions of the dvc-file are present (with some committed into git), only versions that were committed are kept in cache. So it wouldn't have caught this issue.Not sure if it's of any significance but in my case, an entry corresponding to my specific file in question remained in the

stateSQLite database.