-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object put --pin option #4095
object put --pin option #4095
Conversation
@magik6k while you're at it, could you do the same for |
|
facepalm |
core/commands/object/object.go
Outdated
if dopin { | ||
defer n.Blockstore.PinLock().Unlock() | ||
} | ||
|
||
output, err := objectPut(n, input, inputenc, datafieldenc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we make objectPut
just return a cid? It returns an Object
type for some reason that contains a stringed cid and an array of links for some reason. It doesnt ever use the links, seems like we could make this a little cleaner
@magik6k one comment about a 'nice to have', then would be good to rebase on latest master to try for greener CI |
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
@whyrusleeping done |
core/commands/object/object.go
Outdated
}, | ||
Marshalers: cmds.MarshalerMap{ | ||
cmds.Text: func(res cmds.Response) (io.Reader, error) { | ||
object := res.Output().(*Object) | ||
return strings.NewReader("added " + object.Hash + "\n"), nil | ||
object := res.Output().(*cid.Cid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this the same, and wrap the cid in an Object
type when calling SetOutput
above, otherwise we're changing the API. this is the last nitpick, i promise :)
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
@whyrusleeping done |
Thanks! Awesome! |
Closes #4092
Based off #4004. The question now is what to do about
object patch *
commands.