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
0b8e0327
Commit
0b8e0327
authored
Dec 03, 2016
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add cmd: use .Default(true) for pin option.
License: MIT Signed-off-by:
Kevin Atkinson
<
k@kevina.org
>
parent
aa97a09b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
core/commands/add.go
core/commands/add.go
+2
-6
No files found.
core/commands/add.go
View file @
0b8e0327
...
...
@@ -76,7 +76,7 @@ You can now refer to the added file in a gateway, like so:
cmds
.
BoolOption
(
wrapOptionName
,
"w"
,
"Wrap files with a directory object."
),
cmds
.
BoolOption
(
hiddenOptionName
,
"H"
,
"Include files that are hidden. Only takes effect on recursive add."
),
cmds
.
StringOption
(
chunkerOptionName
,
"s"
,
"Chunking algorithm to use."
),
cmds
.
BoolOption
(
pinOptionName
,
"Pin this object when adding.
Default
:
true
."
),
cmds
.
BoolOption
(
pinOptionName
,
"Pin this object when adding.
"
)
.
Default
(
true
),
cmds
.
BoolOption
(
rawLeavesOptionName
,
"Use raw blocks for leaf nodes. (experimental)"
),
},
PreRun
:
func
(
req
cmds
.
Request
)
error
{
...
...
@@ -135,13 +135,9 @@ You can now refer to the added file in a gateway, like so:
hidden
,
_
,
_
:=
req
.
Option
(
hiddenOptionName
)
.
Bool
()
silent
,
_
,
_
:=
req
.
Option
(
silentOptionName
)
.
Bool
()
chunker
,
_
,
_
:=
req
.
Option
(
chunkerOptionName
)
.
String
()
dopin
,
pin_found
,
_
:=
req
.
Option
(
pinOptionName
)
.
Bool
()
dopin
,
_
,
_
:=
req
.
Option
(
pinOptionName
)
.
Bool
()
rawblks
,
_
,
_
:=
req
.
Option
(
rawLeavesOptionName
)
.
Bool
()
if
!
pin_found
{
// default
dopin
=
true
}
if
hash
{
nilnode
,
err
:=
core
.
NewNode
(
n
.
Context
(),
&
core
.
BuildCfg
{
//TODO: need this to be true or all files
...
...
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