ipld / js-ipld-git

MIT License
34 stars 11 forks source link

Where does `original` come from #50

Closed vmx closed 5 years ago

vmx commented 5 years ago

The author resolves a field called original according to the tree() method: https://github.com/ipld/js-ipld-git/blob/784c464ac08a52d06b20a964b8fd260a74cabd71/src/resolver.js#L12

When you resolve it, it just return the full author object and has original as remainderPath. So it doesn't actually resolve original.

When I look at the Go version, it also doesn't have the original field:

https://github.com/ipfs/go-ipld-git/blob/480e59baae911caf7e0d8f5eb38d169b772564e8/commit.go#L70

@magik6k Do you know where it comes from?

I'm asking as I currently for on the IPLD Format cleanup and while I do that, I would just remove original from the tree() fields.

vmx commented 5 years ago

With "removing original" I meant that instead of having author/original there, it would just be author.

magik6k commented 5 years ago

It was a hack to be sure that serializing preserved the original formatting (which can be weird sometimes)

Just having author sounds fine.

vmx commented 5 years ago

It's removed in the most recent release.