1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-01 16:05:47 +08:00

61 Commits

Author SHA1 Message Date
ddc8d0c60c commands: remove EnableStdin support for StringArg
With verbose flag:
* remove EnableStdin() flags on all StringArg,

* remove all unneeded parsing code for StringArg, and print an
* informative message if `ipfs` begins reading from a CharDevice,

* remove broken go tests for EnableStdin cli parsing, and add some
* trivial test cases for reading FileArg from stdin,

* add a panic to prevent EnableStdin from being set on
* StringArg in the future.

Resolves: #2877, #2870
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
2016-06-26 12:28:55 +10:00
714f2debea Add Files API root as best-effort pin.
Closes #2697.  Closes #2698.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-06-20 17:09:56 -04:00
7f61030eb5 All commands: Align to under 78-ruler width
This is just for the description, for now.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-06-01 16:44:29 +01:00
39f23677f5 pin: use new constants instead of literal values
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-05-15 18:18:29 +02:00
f6a1be68ab pin ls: Remove count option, add Default to quiet
'count' is never referenced in the code, and adds nothing when run with `ipfs pin ls` currently. I have removed it; add it again when there is actual logic to reflect. Also, added a Default(false) to quiet.

Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-05-12 11:41:19 -04:00
0a45ada4ed CLI: discoverability and consistency (#2542)
* reduces help indent from 4 to 2 spaces

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* reduces horz/vert space taken by "ipfs" cmd

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* show subcommands on shorthelp

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Drops colons at the end of cmd headings.

This makes command headings consistent with the output of 'ipfs', which
does not include colons.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* more consistent output between short-/long-help

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Puts DESCRIPTION before SUBCOMMANDS.

Users likely want to understand what a command does before worrying
about its subcommands.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Keeps ipfs cmd from outputting its subcmds twice.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes redundant synopsis from "file"

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes extra whitespace from longhelp

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Consistent spacing whether SUBCMDS or not.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes redundant SUBCMD output from ipfs object.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes redundant synopsis from "name"

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Newline after Description only if it exists.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes redundant synopsis from "bootstrap"

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes redundant synopsis from "swarm"

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes trailing newline in ping help.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Prints shorthelp on parse error.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* tiny comment fixes

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* updates README usage

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Don't include extra whitespace if no .MoreHelp

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* description improvements

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Hides the obscure 'file' subcommand.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Splits 'ipfs daemon' into Short and Long help.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes redundant synopsis from "config"

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Wraps lines to keep from going over 80.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* specify repo separately

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* s/structure/hierarchy

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* missing .

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes trailing colon from 'usage' test.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Updates sharness test error messages.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes trailing colon from 'usage' test.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Updates add-symlink to use /bin/sh.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Removes "hierarchy".

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>

* Updates "ipfs ping" synopsis.

* Updates t0040 with latest wording.

* Removes unnecessary daemon setup.

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-04-28 14:08:32 -07:00
f15abc223c use the builtin option parser to set the default for ipfs pin ls --type
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2016-03-30 20:00:40 -04:00
ef4e8837c6 change ipfs pin response field name from Pinned to Pins
This way, we don't claim to pin when unpinning.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2016-03-30 20:00:40 -04:00
767ee13ea2 add default option value support to commands lib
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-04 10:58:27 -08:00
cba00b900b fixes from review
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-24 10:06:07 -08:00
63fbc7b62b Added other entries
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-02-18 20:41:08 -05:00
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
5474e15e93 blockstore locks return unlocker object now
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-08 14:42:07 -08:00
0e8a6700f9 correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
28fe2e4f4c Capitalized beginning of line messages, added periods
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-24 22:39:34 +00:00
rht
6cfc00e18b Merge pull request #2231 from rht/docs/punc-caps
Fix punc-caps issues of cli Tagline
2016-01-23 12:52:08 +07:00
rht
21e39240ab Fix punc-caps issues of cli Tagline
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-22 02:36:17 +07:00
29830da6a5 core/commands/pin: change the default for --type to 'all'
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-20 21:33:09 +01:00
f5f923a7a8 core/commands/pin: update 'ipfs pin ls' documentation
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-18 21:37:44 +01:00
d87ece14ce core/commands/pin: refactor listing all pins
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-18 21:37:44 +01:00
4244f71dcd core/commands/pin: make 'ipfs pin ls' accept path args
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-18 21:37:44 +01:00
c89e3c22eb core/commands/pin: refactor 'pin ls'
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-18 21:37:44 +01:00
3c6a40a3a7 remove failed merge tag from pin ls help
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 12:32:21 -08:00
b12ee40aba implement mark and sweep GC
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

dont GC blocks used by pinner

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

comment GC algo

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

add lock to blockstore to prevent GC from eating wanted blocks

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

improve FetchGraph

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

separate interfaces for blockstore and GCBlockstore

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

reintroduce indirect pinning, add enumerateChildren dag method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
27f34b4311 renamed {R,}Lock -> {Pin,GC}Lock
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2016-01-12 08:21:13 -08:00
7b675e870c lock blockstore for pin add
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
96e45c7457 Use uint64 for indirect pin refcounts
Platform-dependent behavior is not nice, and negative refcounts are
not very useful.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
9916f8663b Updated Pin Remove Tagline and Description
License: MIT
Signed-off-by: ForrestWeston <Forrest.Weston@gmail.com>
2015-10-14 09:42:19 -07:00
01239147b7 changed pinning to be recursive by default
pin add, pin rm, and pin ls will be recursive unless
specified with '=false' eg. 'ipfs pin add -r=false <file>'
tests for pinning have been updated/added

License: MIT
Signed-off-by: ForrestWeston <Forrest.Weston@gmail.com>
2015-10-13 17:11:05 -07:00
138198e786 print output on test failure for t0081
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-27 18:34:37 -07:00
bb3a75aa08 remove context from context
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 20:53:06 -07:00
f9f3c6a527 make offline commands respect timeout
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 14:34:16 -07:00
rht
c14ab9bd51 go vet on core/commands 2015-06-03 17:20:40 +07:00
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
5d1a25bbb9 core/commands: pin ls: display types by default
If you want to get only the hashes (i.e. the previous behaviour), you can use
the `--quiet` flag.
2015-04-28 19:15:15 +01:00
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -07:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
6a3578be84 explain what direct/indirect/recursive means
i couldn't understand what those meant. it was explain (at least partly) in #590 so let's share the goods!
2015-03-07 08:32:48 -05:00
d5e4c6a0bf move core/repo to core/corerepo 2015-01-24 01:32:27 -08:00
7b4de230eb commands: Refactored Command#Run function signature to (req Request, res Response) 2015-01-23 18:29:29 -08:00
9adcfe7bc2 address concerns from PR 2015-01-21 04:28:02 +00:00
b91db68056 update pinning to new semantics, and fix a couple bugs 2015-01-21 04:28:01 +00:00
3601a93d17 fix pin command output 2015-01-21 04:28:01 +00:00
86bb8ca7a7 core/commands: Enabled stdin for various command arguments 2015-01-13 22:51:11 -08:00
6236ef7fdb core/commands: Made add command output a channel
core/commands: Don't use pointers for Type field
2015-01-06 15:55:16 -08:00
65c6bd07bf feat(core/commands): expose commands to allow for the development of high-level interface
+ style: sort command list

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
5461d76957 core/commands: Better syntax for 'pin ls' option value handling 2014-11-19 03:23:21 -08:00
928f20b4bd core/commands: pin ls: Default type to 'direct' 2014-11-19 01:44:51 -08:00
9de01007d0 core/commands: pin ls: Accept 'type' option to specify type of pinned keys to list 2014-11-19 00:53:57 -08:00