-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty subdirectories left in place while checking out previous version of the datasets #4344
Comments
I was able to reproduce it with this: mkdir datasets
mkdir datasets/dir1
echo "file1" > datasets/dir1/file1
dvc add datasets
git add .
git commit -a -m "add datasets v1"
mkdir datasets/dir2
echo "file2" > datasets/dir2/file2
dvc add datasets
git add .
git commit -a -m "add datasets v2"
git checkout HEAD^
dvc checkout
tree datasets outputs:
|
pared
added
bug
Did we break something?
p1-important
Important, aka current backlog of things to do
labels
Aug 6, 2020
efiop
added
p2-medium
Medium priority, should be done, but less important
and removed
p1-important
Important, aka current backlog of things to do
labels
Aug 6, 2020
Do we have any updates on this? I still encounter this issue in version |
@lefos99 , I had tried the script in #4344 (comment) still result tree datasets
datasets
├── dir1
│ └── file1
└── dir2
2 directories, 1 file |
Hi, can confirm that this problem still exists. I guess we can safeguard it on our code to ignore empty directories as for now, it does not seem that this is a priority. |
Is this a duplicate of #2397? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
I am tracking versions of a set of datasets in this repository.
The directory structure is as shown below.
Each version of the datasets adds additional subdirectories to the
datasets
directory.When checking out an older version (say
v1
) usinggit checkout v1
followed by advc checkout
, DVC leaves empty subdirectories instead of removing them.Specifically, if
dataset1
was present inv1
butdataset2
was added byv2
, checking outv1
leaves behind an emptydataset2
directory.Output of
dvc version
:The text was updated successfully, but these errors were encountered: