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
b5b61f75
Commit
b5b61f75
authored
Sep 10, 2017
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename "files update" to "files chcid".
License: MIT Signed-off-by:
Kevin Atkinson
<
k@kevina.org
>
parent
d29930c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
core/commands/files/files.go
core/commands/files/files.go
+11
-11
test/sharness/t0250-files-api.sh
test/sharness/t0250-files-api.sh
+3
-3
No files found.
core/commands/files/files.go
View file @
b5b61f75
...
...
@@ -58,16 +58,16 @@ from the parent directory.
// that uses "hash"
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"read"
:
FilesReadCmd
,
"write"
:
FilesWriteCmd
,
"mv"
:
FilesMvCmd
,
"cp"
:
FilesCpCmd
,
"ls"
:
FilesLsCmd
,
"mkdir"
:
FilesMkdirCmd
,
"stat"
:
FilesStatCmd
,
"rm"
:
FilesRmCmd
,
"flush"
:
FilesFlushCmd
,
"
update
"
:
Files
Update
Cmd
,
"read"
:
FilesReadCmd
,
"write"
:
FilesWriteCmd
,
"mv"
:
FilesMvCmd
,
"cp"
:
FilesCpCmd
,
"ls"
:
FilesLsCmd
,
"mkdir"
:
FilesMkdirCmd
,
"stat"
:
FilesStatCmd
,
"rm"
:
FilesRmCmd
,
"flush"
:
FilesFlushCmd
,
"
chcid
"
:
Files
Chcid
Cmd
,
},
}
...
...
@@ -791,7 +791,7 @@ are run with the '--flush=false'.
},
}
var
Files
Update
Cmd
=
&
cmds
.
Command
{
var
Files
Chcid
Cmd
=
&
cmds
.
Command
{
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Change the cid version or hash function of the root node of a given path."
,
ShortDescription
:
`
...
...
test/sharness/t0250-files-api.sh
View file @
b5b61f75
...
...
@@ -606,7 +606,7 @@ tests_for_files_api() {
fi
test_expect_success
"can update root hash to cidv1"
'
ipfs files --cid-version=1
update
/ &&
ipfs files --cid-version=1
chcid
/ &&
echo zdj7WbTaiJT1fgatdet9Ei9iDB5hdCxkbVyhyh8YTUnXMiwYi > hash_expect &&
ipfs files stat --hash / > hash_actual &&
test_cmp hash_expect hash_actual
...
...
@@ -617,7 +617,7 @@ tests_for_files_api() {
if
[
"
$EXTRA
"
=
"offline"
]
;
then
test_expect_success
"can update root hash to blake2b-256"
'
ipfs files --hash-fun=blake2b-256
update
/ &&
ipfs files --hash-fun=blake2b-256
chcid
/ &&
echo zDMZof1kvswQMT8txrmnb3JGBuna6qXCTry6hSifrkZEd6VmHbBm > hash_expect &&
ipfs files stat --hash / > hash_actual &&
test_cmp hash_expect hash_actual
...
...
@@ -630,7 +630,7 @@ tests_for_files_api() {
fi
test_expect_success
"can update root hash back to cidv0"
'
ipfs files --cid-version=0
update
/ &&
ipfs files --cid-version=0
chcid
/ &&
echo QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn > hash_expect &&
ipfs files stat --hash / > hash_actual &&
test_cmp hash_expect hash_actual
...
...
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