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-unixfs
Commits
b77d1c21
Commit
b77d1c21
authored
Jan 22, 2015
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/commands: add: Don't show progress bar when using --quiet option
parent
121dfb10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
core/commands/add.go
core/commands/add.go
+5
-1
No files found.
core/commands/add.go
View file @
b77d1c21
...
...
@@ -55,6 +55,10 @@ remains to be implemented.
cmds
.
BoolOption
(
progressOptionName
,
"p"
,
"Stream progress data"
),
},
PreRun
:
func
(
req
cmds
.
Request
)
error
{
if
quiet
,
_
,
_
:=
req
.
Option
(
"quiet"
)
.
Bool
();
quiet
{
return
nil
}
req
.
SetOption
(
progressOptionName
,
true
)
sizeFile
,
ok
:=
req
.
Files
()
.
(
files
.
SizeFile
)
...
...
@@ -120,7 +124,7 @@ remains to be implemented.
if
found
{
size
=
s
.
(
int64
)
}
showProgressBar
:=
size
>=
progressBarMinSize
showProgressBar
:=
!
quiet
&&
size
>=
progressBarMinSize
var
bar
*
pb
.
ProgressBar
var
terminalWidth
int
...
...
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