You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Diff algorithm seems to be designed to work with directories as inputs, comparing its links, not with single files (or an empty directory, that for this case behaves the same). The base case of this recursive function is assuming (my interpretation) that if it reached that node in the tree it's because they (version A and B) had different hashes in the parent node (directory) that led it to them, and hence they are different (so it returns it as a modification in the tree). It is not contemplating the case where the algorithm starts at the leaf (single file, empty directory). I think that base case should be modified to take that into account.
Version information:
go-ipfs version: 0.4.13-
Repo version: 6
System version: amd64/darwin
Golang version: go1.9.2
Type:
Bug
Severity:
Low
Description:
To recreate:
ipfs files mkdir /testdir
HASH=$(ipfs files stat --hash /testdir)
ipfs object diff $HASH $HASH
output is:
I would expect it to be empty
The text was updated successfully, but these errors were encountered: