提交 29830da6 作者: Christian Couder

core/commands/pin: change the default for --type to 'all'

License: MIT
Signed-off-by: 's avatarChristian Couder <chriscool@tuxfamily.org>
上级 2dd4f40c
# go-ipfs changelog
### 0.4.0 - 2016-01-31
* Features
* add optional path arguments to 'ipfs pin ls' (@chriscool)
* Incompatible Changes
* the default for '--type' in 'ipfs pin ls' is now "all" (@chriscool)
### 0.3.10 - 2015-12-07
This patch update introduces the 'ipfs update' command which will be used for
......
......@@ -161,11 +161,11 @@ var listPinCmd = &cmds.Command{
Tagline: "List objects pinned to local storage",
ShortDescription: `
Returns a list of objects that are pinned locally.
Without arguments, by default, only recursively pinned objects are returned, but others may be shown via the '--type' flag.
By default, all pinned objects are returned, but the '--type' flag or arguments can restrict that to a specific pin type or to some specific objects respectively.
`,
LongDescription: `
Returns a list of objects that are pinned locally.
Without arguments, by default, only recursively pinned objects are returned, but others may be shown via the '--type' flag.
By default, all pinned objects are returned, but the '--type' flag or arguments can restrict that to a specific pin type or to some specific objects respectively.
Use --type=<type> to specify the type of pinned keys to list. Valid values are:
* "direct": pin that specific object.
......@@ -222,21 +222,15 @@ Example:
res.SetError(err, cmds.ErrClient)
return
}
} else {
typeStr = "all"
}
var keys map[string]RefKeyObject
if len(req.Arguments()) > 0 {
if !typeStrFound {
typeStr = "all"
}
keys, err = pinLsKeys(req.Arguments(), typeStr, req.Context(), n)
} else {
if !typeStrFound {
typeStr = "recursive"
}
keys, err = pinLsAll(typeStr, req.Context(), n)
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论