Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
2492f0cb
Commit
2492f0cb
authored
Sep 23, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document the set-data and append-data commands in patch
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
e812abbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
core/commands/object.go
core/commands/object.go
+16
-2
No files found.
core/commands/object.go
View file @
2492f0cb
...
...
@@ -433,9 +433,17 @@ var objectPatchCmd = &cmds.Command{
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Create a new merkledag object based on an existing one"
,
ShortDescription
:
`
'ipfs object patch <root>
[add-link|rm-link]
<args>' is a plumbing command used to
'ipfs object patch <root>
<cmd>
<args>' is a plumbing command used to
build custom DAG objects. It adds and removes links from objects, creating a new
object as a result. This is the merkle-dag version of modifying an object.
object as a result. This is the merkle-dag version of modifying an object. It
can also set the data inside a node with 'set-data' and append to that data as
well with 'append-data'.
Patch commands:
add-link <name> <ref> - adds a link to a node
rm-link <name> - removes a link from a node
set-data - sets a nodes data from stdin
append-data - appends to a nodes data from stdin
Examples:
...
...
@@ -450,6 +458,12 @@ a file containing 'bar', and returns the hash of the new object.
This removes the link named foo from the hash in $FOO_BAR and returns the
resulting object hash.
The data inside the node can be modified as well:
ipfs object patch $FOO_BAR set-data < file.dat
ipfs object patch $FOO_BAR append-data < file.dat
`
,
},
Options
:
[]
cmds
.
Option
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment