-
Notifications
You must be signed in to change notification settings - Fork 11
Wrong entry ordering in tree serialization #44
Comments
So git entries have to be be sorted, but the sorting function appears to be weird:
(note how |
Might have found the issue - from http://git.661346.n2.nabble.com/In-tree-object-Must-the-td7446900.html#a7447657
|
@magik6k That sounds like being the source of the issue, indeed. What would the best solution, then ? Regarding how the sorting function is implemented here maybe the best way would be to check if How would you like to proceed. I let you update the sorting function or do you want me to push a PR? |
If you have some code, open a PR with it, it will be faster/easier to iterate on that |
I don't have yet. I will try to work on it tonight or tomorrow, and then open a PR. |
Hi everyone,
I'm working on pando - a decentralized
git-remote
based on IPFS, Ethereum and Aragon - and I think I've spotted an error in how this resolver handlestree
serialization.If you have let's say a git repo with both a
test.md
and atest
folder as in this repo example git orders them this way:Now
js-ipld-git
is gonna order them the other way around:This leads to an error where the result of the
shaToCid
function and the CID of the actually serializedtree
object are not the same - thus breaking the whole commit tree.This comes from the sorting function implemented here.
Do you think you guys could have a look or do you prefer me to dive deeper in it and open a PR?
The text was updated successfully, but these errors were encountered: