Skip to content

Usage of links can cause inconsistent/confusing diff after restore or changes #48

Description

@nikop

It doesn't matter whatever changes are done by hand or snapraid itself (during fix).
After fix operation, diff could still list many "removed" files, that were actually correctly restored.

Small test case:

Create test files:

$ echo "1234567890" > test1.txt
$ ln test1.txt test2.txt
$ ln test1.txt test3.txt
$ ln test1.txt test4.txt

Diff & Sync (this is right)

$ snapraid diff

add test/test1.txt
add test/test2.txt
add test/test3.txt
add test/test4.txt

$ snapraid sync

Let's make small change:

$ mv test1.txt test5.txt

$ snapraid diff

move test/test1.txt -> test/test2.txt
update test/test3.txt
update test/test4.txt
add test/test5.txt
remove test/test2.txt

Here we have one add and one removal, even though we only renamed a file (and two updates)
I think it should detect that test5 and test2 are the same file.

$ mv test5.txt test1.txt

$ snapraid diff

move test/test1.txt -> test/test2.txt
update test/test3.txt
update test/test4.txt
add test/test1.txt
remove test/test2.txt

Even after we are back to original state, diff remains confusing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions