1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-15 07:58:15 +08:00

102 Commits

Author SHA1 Message Date
bd9576fa57 start adopting cmds3.0 - lots of errors!
- move go-ipfs-cmds/legacy to go-ipfs/commands/legacy
- update cmds,cmdkit; go test ./... ok

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
e0f38fa33b Merge pull request #4406 from ipfs/fix/4405
Fix two race conditions (and possibly go routine leaks) in commands
2017-11-21 15:23:39 -08:00
bcd25416d9 cmds: rename DefaultVal -> Default, Default -> WithDefault
Propagate change from cmdkit.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-20 22:20:49 -08:00
76e1da02a8 gx: massive update
Note: This commit is technically broken. However, I need to make a bunch of
cmds changes to make this work and I'd rather not bundle both changes into a
single commit.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-20 22:20:27 -08:00
65489c1744 fix concurrent SetError in pin command
(segfault)

Also, buffer the response channel. I believe we had a go routine leak here
before.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-11-20 20:34:58 -08:00
57f544a79c remove all instances of Default(false)
Boolean options always default to false.

License: MIT
Signed-off-by: Lorenzo Manacorda <lorenzo@mailbox.org>
2017-11-20 16:10:15 +01:00
f287524949 cmd: use go-ipfs-cmds
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:41 +01:00
70d6629940 gx: update go-cid, go-multibase, base32
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-01 17:46:49 -07:00
cccc6a94a3 update go-multihash and bubble up changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 19:27:43 -07:00
8ab93aaeb2 Update go-datastore to 1.2.2, go-cid to 0.7.16
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-07-04 20:18:57 +02:00
13636bef50 blocks: gx import go-block-format
And updated related dependencies.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-29 22:12:14 +02:00
e2cd36e88f pinning + pathresolver: fix pinning/unpinning of sharded directories
* Change ResolveToCid to take a Resolver and a NameSystem instead of an ipfs
  Node.
* Make the pin/unpin methods use a Unixfs path resolver.

Closes: #3974

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-12 18:12:29 -07:00
b4a008720d "pin verify": fix API
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-05-25 13:52:04 -04:00
7a4031ddb7 "pin verify": add --verbose and --quiet options
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-05-25 13:40:06 -04:00
6e898ea678 "pin verify": don't use a pointer to a slice.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-05-25 13:40:06 -04:00
325e1c0839 "pin verify": basic implementation
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-05-25 13:40:06 -04:00
315849639d implement ipfs pin update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-05-17 21:31:47 -07:00
b15470d548 bubble up updates from go-multihash changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-20 20:28:04 +02:00
6a7750d5c2 fix pin add api break
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-07 01:10:46 -08:00
6e4fd937fd Refactor EnumerateChildren to avoid need for bestEffort parameter.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-02 05:19:41 -05:00
cdd29c24a2 Report progress during 'pin add'.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-02-17 16:19:42 -05:00
b4eeff2d84 update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-02-12 12:25:41 -08:00
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
5d20ddc957 Lowercase error messages
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2016-11-24 19:36:26 +01:00
ac054f3d8f Issue #3419: Do not recursively resolve DAG just to obtain a CID
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2016-11-24 17:10:52 +01:00
396c629301 update to newer ipld node interface with Copy and better Tree
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-15 18:00:49 -08:00
67c2a4ec14 make path resolver no longer require whole node for construction
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-25 15:04:44 -07:00
eac13abaec update to new cid and ipld node packages
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-25 09:54:04 -07:00
f4d7369c4a bitswap: protocol extension to handle cids
This change adds the /ipfs/bitswap/1.1.0 protocol. The new protocol
adds a 'payload' field to the protobuf message and deprecates the
existing 'blocks' field. The 'payload' field is an array of pairs of cid
prefixes and block data. The cid prefixes are used to ensure the correct
codecs and hash functions are used to handle the block on the receiving
end.

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-10 08:19:31 -07:00
772164cc7a Fix EnumerateChildren & hasChild to take a *cid.Cid instead of []*mdag.Link
Author: Kevin Atkinson <k@kevina.org>

Fix EnumerateChildren & hasChild to take a *cid.Cid instead of []*mdag.Link

Author: Jeromy Johnson <why@ipfs.io>

make FetchGraph use a cid

pin: fix TestPinRecursiveFail

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-10-06 11:55:31 -04:00
3899194cb0 Add DAGService.GetLinks() method and use it in the GC and elsewhere.
This method will use the (also new) LinkService if it is available to
retrieving just the links for a MerkleDAG without necessary having to
retrieve the underlying block.

For now the main benefit is that the pinner will not break when a block
becomes invalid due to a change in the backing file.  This is possible
because the metadata for a block (that includes the Links) is stored
separately and thus always available even if the backing file changes.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-10-06 11:38:41 -04:00
1f9ec4e3ed update to libp2p 4.0.1 and propogate other changes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-05 22:12:43 -07:00
c8fe495934 integrate CIDv0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-09-07 13:32:32 -07:00
dcfd842d83 Merge pull request #3041 from JesseWeinstein/docs/cli-use-imperative
Make all Taglines use imperative mood
2016-08-16 09:25:09 -07:00
b76dcb8dd7 Add period to ipfs pin rm
Small doc fix.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-08-15 10:46:15 -04:00
1d6a47bf93 Make all Taglines use imperative mood
License: MIT
Signed-off-by: Jesse Weinstein <jesse@wefu.org>
2016-08-04 16:45:59 -07:00
5d301cb8ec re-enable the stdin
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-08 16:39:15 -07:00
1aeda7eb6e ignore those last bits, this time its for real
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-08 14:35:18 -07:00
a6af6c504b clean up previous work a bit
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-08 11:09:12 -07:00
96433cc6e1 starting to rework stdin handling
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-07 16:58:43 -07:00
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