Closed zbitouzakaria closed 6 years ago
Yes, you are right. Because they are hardlinked editing one file will also edit the cached file. One would need to overwrite one of the files to get a new inode. I guess this means the file do need to be copied unless the user wants to specifically use hardlinking.
Thanks for this bug report!
I've now switched to using copy instead of hardlink as a default. Will probably add hardlinking as an option, and probably still need to write a test case for this specific case.
The latest version lazydata 1.0.16
should have this bug solved.
... and further fixes in lazydata 1.0.17
I tested this out by creating and tracking a single file through multiple revisions.
Let's say we have a
big_file.csv
whose content look like this:We first track it using this script:
Change the file content multiple times, for ex:
And keep executing the script between the multiple revisions:
A simple
ls
afterwards points to the mistake:Notice the number of hardlinks to
big_file.csv
. There should only be one. What is happening is that all the revisions point to the same file.You can also check
~/.lazydata/data
directly for the content of the different files. It'a all the same.