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

53 Commits

Author SHA1 Message Date
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
6f82f08611 fix error handling in core/commands/{add,get}.go
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-12-04 14:27:34 +01:00
8e5fbe9aa1 update go-ipfs-cmds to 0.4.11
to include @frist's uuid logging

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-22 19:06:00 +01: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
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
a09d974652 core: get cmd outPath removes trailing slash - fixes #3729
When using path with trailing slashes, ipfs get command had issues
with trying to store content into '.' folder (as the file part of the path
was empty). Now, it correctly stores the file into desired folder,
thanks to the removal of trailing slash by introducing a
getOutPath function in get command, which does proper parsing
Of the output path.

BEFORE:
 $  .pfs get /ipns/multiformats.io/
Saving file(s) to .

NOW:
$ ./ipfs get /ipns/multiformats.io/
Saving file(s) to multiformats.io

License: MIT
Signed-off-by: adamliesko <adamliesko@gmail.com>
2017-11-18 20:04:18 +01:00
d95a87cf57 update to go-ipfs-cmds 0.4.9
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:42 +01:00
0d9d21875c compatible to js-ipfs-api
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2017-11-17 15:22:42 +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
66cc2f2e88 fix: ipfs get panic with empty API call
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-09 15:42:15 +01:00
eca0d1c734 Merge pull request #3757 from ipfs/fix/get-raw-leaves
make raw leaves work with 'ipfs get'
2017-03-07 15:40:18 -08:00
169f7899ba fix progress bar on ipfs get
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-06 22:59:10 -08:00
b1588c7162 make raw leaves work with 'ipfs get'
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-03-06 20:12:05 -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
01aee44679 merkledag: change 'Node' to be an interface
Also change existing 'Node' type to 'ProtoNode' and use that most
everywhere for now. As we move forward with the integration we will try
and use the Node interface in more places that we're currently using
ProtoNode.

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-12 08:16:03 -07:00
5d301cb8ec re-enable the stdin
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-08 16:39:15 -07:00
43cd49dcb4 fix progress bar in ipfs get
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-06 15:42:08 -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
fd1eae87f7 Merge pull request #2782 from ipfs/feature/78-ruler
All commands: Align to under 78-ruler width
2016-06-01 09:45:55 -07: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
afb2afc7bc Move pb to gx
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-05-31 22:36:22 +02:00
26375df590 Added Default logic to get cmd
Part of #2484

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-05-11 16:47:55 -04:00
41a6859262 Merge pull request #2366 from ipfs/docs/edit-ls-desc
Edit the ls.go description
2016-02-19 08:34:31 -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
50a44f9962 Added ticks, the, and defaults to get
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-02-18 18:11:06 -05: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
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
rht
7caba7e46a Use common progressbar function for cat and get
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-10-04 22:43:47 +07:00
4b81d9e85e Fix gzip compression level not being set.
If "compression-level" is set, the compression is set to gzip.Nocompression.

License: MIT
Signed-off-by: Klaus Post <klauspost@gmail.com>
2015-09-15 12:12:11 +02:00
rht
9f0c8134cb Decompose DagArchive from unixfs tar
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-20 14:56:07 +07:00
rht
dfa0351df9 Refactor ipfs get
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-20 14:56:07 +07:00
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00
e3c35d8b76 cmds/get: fix context timeout problem
Get had a random timeout of 60s. This commit fixes that, wiring
up our contexts correctly.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-24 14:43:17 -07:00
bb3a75aa08 remove context from context
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-20 20:53:06 -07:00
rht
dfde18e124 Add path validation in Resolver.ResolvePath
Add ErrNoComponents in ParsePath validation & remove redundant path
validation.
Any lines using core.Resolve & Resolver.ResolvePath will have their path
validated.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 02:41:28 +07:00
rht
3798178705 Don't use tar reader for '-C' only flag
Currently `ipfs get -C <hash>` returns error even if <hash> is a file.
This PR is for the case when the compress flag is enabled, use the
dagreader directly and pipe to a gzip processor.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-01 09:36:25 +07:00
f640ba0089 core: add context.Context param to core.Resolve()
commands/object: remove objectData() and objectLinks() helpers
resolver: added context parameters
sharness: $HASH carried the \r from the http protocol with
sharness: write curl output to individual files
http gw: break PUT handler until PR#1191
2015-05-08 03:14:32 +02:00
31ff954539 Move IPNS resolutions into the core library
Move IPNS resolutions into the core library via the pathresolver.go
file. Fix the CLI commands to leverage this core component.
2015-04-20 01:04:30 -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
abb3c9c9c4 implement path type 2015-01-29 17:51:08 +00:00
d666155a0a core/commands: get: Clean output path 2015-01-26 17:07:30 -08:00
41d5c822d7 core/commands: get: Place files at root of TAR when using a multi-element ipfs path 2015-01-24 21:40:19 -08:00
27c7ebdf48 core/commands: get: Changed option description 2015-01-24 07:28:43 -08:00
3909905313 core/commands: get: Cleaned up option handling 2015-01-24 05:35:27 -08:00
fe48ae2dd6 Extracted TAR archive building/reading code out of 'ipfs get' 2015-01-24 03:06:25 -08:00
5efd99c1fe core/commands: get: Error if specified compression level is invalid 2015-01-24 03:06:25 -08:00
816a047a12 core/commands: 'get' arguments shouldn't be variadic 2015-01-24 03:06:25 -08:00
f034f3e13a core/commands: Show download progress in 'get' 2015-01-24 03:06:25 -08:00
f3c4f87ec2 core/commands: Added GZIP compression to 'get' 2015-01-24 03:06:25 -08:00