@cryptotaxi247 / kubo / commits / 29830da6a

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

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Jan 20, 2016 at 21:20 UTC 29830da6a532a5264469c2091b89b531cc771bd6
2 files changed +13 -10
CHANGELOG.md
+9
@@ -1,5 +1,14 @@
1 # go-ipfs changelog
2
3 +### 0.4.0 - 2016-01-31
4 +
5 +* Features
6 + * add optional path arguments to 'ipfs pin ls' (@chriscool)
7 +
8 +* Incompatible Changes
9 + * the default for '--type' in 'ipfs pin ls' is now "all" (@chriscool)
10 +
11 +
12 ### 0.3.10 - 2015-12-07
13
14 This patch update introduces the 'ipfs update' command which will be used for
core/commands/pin.go
+4 -10
@@ -161,11 +161,11 @@ var listPinCmd = &cmds.Command{
161 Tagline: "List objects pinned to local storage",
162 ShortDescription: `
163 Returns a list of objects that are pinned locally.
164 -Without arguments, by default, only recursively pinned objects are returned, but others may be shown via the '--type' flag.
164 +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.
165 `,
166 LongDescription: `
167 Returns a list of objects that are pinned locally.
168 -Without arguments, by default, only recursively pinned objects are returned, but others may be shown via the '--type' flag.
168 +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.
169
170 Use --type=<type> to specify the type of pinned keys to list. Valid values are:
171 * "direct": pin that specific object.
@@ -222,21 +222,15 @@ Example:
222 res.SetError(err, cmds.ErrClient)
223 return
224 }
225 + } else {
226 + typeStr = "all"
227 }
228
229 var keys map[string]RefKeyObject
230
231 if len(req.Arguments()) > 0 {
230 - if !typeStrFound {
231 - typeStr = "all"
232 - }
233 -
232 keys, err = pinLsKeys(req.Arguments(), typeStr, req.Context(), n)
233 } else {
236 - if !typeStrFound {
237 - typeStr = "recursive"
238 - }
239 -
234 keys, err = pinLsAll(typeStr, req.Context(), n)
235 }
236