1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-18 03:10:41 +08:00

85 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
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
f433a95201 core/commands: Save 'get' output to disk
squash! core/commands: Save 'get' output to disk

core/commands: get: Fixed PostRun signature
2015-01-24 03:06:25 -08:00
276a8d062c core/commands: Made 'get' copying thread-safe 2015-01-24 03:06:24 -08:00
36249b9292 core/commands: Added 'get' command 2015-01-24 03:06:24 -08:00