'ipfs get' to checkout commits and MerkelDag objects as files#22
'ipfs get' to checkout commits and MerkelDag objects as files#22dborzov wants to merge 1 commit intoipfs:masterfrom
Conversation
Hm, let's not for now. The goal is for the IPFS merkledag is to support applications creating their own data structures, whether they want to use commits or not. at the moment, |
I don't understand. Make more sense? |
|
I don't think I think your PR is really about allowing creation of commits. I don't think these should be added by default on |
|
I see your point. Should it be something that uses json serilization to create stuff? and create it with: or something else? |
|
Also, how is the object's type ( So that we get for If I am reading this right, what is the motivation to reuse the data field to define the links' types? How do you see it implemented since and typical data field to be: or am I missing something? |
|
Also, a noob question: am I running the tests locally wrong? I ran from the root directory and it says all tests went ok. And I can't find the one that Travis CI says fails. ¯_(ツ)_/¯ |
|
The failing Travis CI test is because we cant write to the testrunners home directory... Need to find some way to disable/get around that test so we can reliably use Travis CI again. |
ecf49fe to
2a7dafd
Compare
609a71b to
5fafaa4
Compare
|
Sorry @dborzov -- August was a very, very time consuming month so I didn't get to your questions. Better late than never, i guess.
Very much like git's plumbing commands. See:
I really like the idea of making plumbing commands be able to take their input in json. The git plumbing uses their own format all over the place (usually just newline-delimited rows of whitespace delimited tokens), and in some cases that will make sense for us too. BUT! JSON is a great format. We should use it too. By too, i really mean multi-format. We should write our plumbing command outputs as structs, and connect encoders at the end that can dump out json, newline-delimited stuff (for unix tools and for human readability), etc.
The paper will change, btw. it will place much less emphasis on these four types of objects, and just suggest them as the sort of things that are possible.
This is something still under discussion. there are multiple options:
So far, I'm leaning:
Yep, that's right. tests should pass now. We should probably add a Hope all that helps! Sorry again for delay. |
|
oh great, tnx for the detailed response! |
cd43433 to
8f1c12e
Compare
|
What is the status here? |
|
I think this has several commits already in master-- maybe needs rebasing? |
|
Hey hey, I will fix this pull request and let you guys know :) |
Updates `Options.ShouldSample`
We get the
ipfs getcommand that allows to retrieve the MerkelDAG objects as files and directories.Another thing is that I added commits. Now for every run of
ipfs addthat results in nonzero object addition, there is also a root commit node:I had to add it to make
ipfs getwork: there was this issue with thegit addthat the filenames weren't reflected in the resultant Node. These names are stored indag.Link, notdag.Node. It makes perfect sense and is this way ingitas well, because this way you can just link to the same node even when the file is renamed, duplicated or moved, but if you want to save filenames you need to have the root node.A Practical Example.
let's store the IPFS's codebase in the IPFS commits!
Now we add all the files (including the
.gitdirectory)and get a long list of the files added. And the last line contains the commit's hash:
Now we erase the whole directory and restore stuff like nothing happened:
cool beans.