Please provide information about your setup
DVC version(i.e. dvc --version), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))
Reproduction script:
#!/bin/bash
rm -rf repo
mkdir repo
pushd repo
git init --quiet
dvc init -q
set -ex
git add -A
git commit -am "init"
echo data1>>data
dvc add data
git add -A
git commit -am "first commit"
rm data
echo data2>>data
dvc add data
git commit -am "second commit"
git tag v1
rm data
echo data3>>data
dvc add data
dvc gc --all-tags
tree .dvc/cache
gc succesfully removes data from cache, but does not check whether parent dir of file in cache is empty and leave it even if it was empty. We should remove that parent dir if there is no other file inside.
EDIT:
expected output of tree should not contain empty directory in cache.
Please provide information about your setup
DVC version(i.e.
dvc --version), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))Reproduction script:
gcsuccesfully removes data from cache, but does not check whether parent dir of file in cache is empty and leave it even if it was empty. We should remove that parent dir if there is no other file inside.EDIT:
expected output of tree should not contain empty directory in cache.