1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-23 09:52:08 +08:00

300 Commits

Author SHA1 Message Date
426477ef78 docs: improve ipfs add --help (#10926)
* fix(cmds): improve ipfs add --help clarity and organization

- clarify --raw-leaves behavior with CIDv0/v1 defaults
- add Import.* config references to all relevant options
- replace deprecated 'ipfs object links' with 'ipfs ls' in examples
- add section headers for better navigation (BASIC EXAMPLES, MFS INTEGRATION, etc.)
- group related options logically (output control, CID & hashing, experimental features)
- standardize experimental warnings format
- add MerkleDAG docs link and clarify chunking behavior
- fix incorrect Import.UnixFSHAMTThreshold reference

addresses confusion from #10918 where --raw-leaves appeared to have no effect
because CIDv1 automatically enables it by default

* docs: fix typos in Import.* configuration documentation

- fix 'chilcren' → 'children'
- fix 'HAMT directory have' → 'HAMT directories have'
- fix 'A HAMT is an structure' → 'A HAMT is a structure'

* Update core/commands/add.go

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
2025-08-21 14:57:30 +02:00
10abb9073d feat(add): add support for naming pinned CIDs (#10877)
* feat(add): add support for naming pinned CID

Signed-off-by: kapil <kapilsareen584@gmail.com>

* fix(add): no double pinning and simplify pin-name

- modify PinRoot to accept name parameter, eliminating double pinning
- remove automatic filename fallback logic for cleaner behavior
- only create named pins when explicitly requested via --pin-name=value
- replace NoPinName constant with idiomatic empty string literals
- Update help text and tests to reflect explicit-only behavior

* docs: changelog

* chore: lint

* test: negative case for empty pin-name

* chore: gofmt

---------

Signed-off-by: kapil <kapilsareen584@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-08-06 02:16:16 +02:00
6b55e64918 feat(config): ipfs add and Import options for controling UnixFS DAG Width (#10774)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-15 22:56:38 +02:00
d137d7a4ad Remove unused TimeParts struct (#10708) 2025-02-11 14:35:19 -08:00
642e58ef3b chore: use errors.New to replace fmt.Errorf with no parameters (#10617) 2024-12-10 13:50:35 -08:00
433444b609 fix(cmds/add): disallow --wrap with --to-files (#10612)
Close #10611
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-12-03 21:49:18 +01:00
263edb251e feat: Support storing UnixFS 1.5 Mode and ModTime (#10478)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-08-21 02:02:46 +02:00
8022e13a6b config: introduce Import section (#10421)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-05-14 14:17:04 +00:00
eb7f663514 commands/add: return an error when using --only-hash and --to-files
In that situation, the data is not written to permanent storage, so a reference in MFS would be to p2p blocks at best.

The /add command in that situation is also likely to hang as it reads immediately the root node without being able to get it (it falls back to bitswap).
2024-02-08 17:49:43 +01:00
58c29399cf chore: clean migration 2023-11-29 12:29:59 +01:00
a5668d22ba chore: update boxo for structification of ImmutablePath 2023-10-09 09:44:39 +02:00
a7c6518497 feat: path consolidation (#10063) 2023-10-06 16:14:44 +02:00
3ab1086f71 chore: migrate go-libipfs to boxo
Resolves #9677, #9676, #9675, #9736
2023-03-28 22:05:25 -04:00
255e64e49e chore: migrate from go-ipfs-files to go-libipfs/files (#9535) 2023-01-13 14:27:03 +01:00
807b98537d Revert "fix: ensure hasher is registered when using a hashing function"
This has been superseeded by 7d0ea08289ee32ec174a2f6a8392859fe8d1977c.

This reverts commit 773c246232c1f3d7fc67d7ddf5b1cb172ece8fa1.
2022-12-05 15:03:16 +01:00
773c246232 fix: ensure hasher is registered when using a hashing function
Fixes #9297
2022-09-26 10:05:26 +02:00
9e5d0aaaec feat(cmds/add): --to-files option automates files cp (#8927)
* feat(cmds/add): --to-files option as files cp
* tests(to-files): ensure error handling is covered

this adds bunch of tests that guard UX around importing multiple files
into MFS, and the logic around trailing slash to indicate if the MFS
destination if a directory.

If the destination has a trailing slash, we ensure that the directory
exists and is a dir and not a file. this allows us to support
adding multipl files into MFS dir:

ipfs add file1.txt file2.txt --to-files /some/mfs/dir/

* docs: to-files helptext

Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-09-21 18:08:36 +02:00
92baa6c039 docs(add): skip binary name in helptext
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2022-08-17 03:30:35 +00:00
0080a66639 docs(cli): clarify CID determinism in add command
Better 'ipfs add --help'  docs, based on feedback from
https://discuss.ipfs.io/t/ipfs-for-publishing-research-data-car-files/14748
2022-08-17 03:30:35 +00:00
82467bc936 refactor: rename to kubo 2022-07-06 18:40:37 +02:00
545571c328 Apply suggestions from code review
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-10-11 20:36:06 +02:00
d5ecec332f docs: ipfs.add: document raw-leaves
Closes #8396
2021-09-24 18:39:39 +02:00
090953d298 docs: tweak ipfs cmd help
https://github.com/ipfs/go-ipfs/pull/8010#discussion_r600842235
https://github.com/ipfs/go-ipfs/pull/8010#discussion_r600842123
2021-03-30 21:26:32 +02:00
0ff1cf33aa docs: cosmetic fixes of help text
Unfortunately, API docs are genereted from go-ipfs sources
via https://github.com/ipfs/http-api-docs
so it all gets lost when API docs for new version are re-generated.

This re-applies manual fixes from:
https://docs.ipfs.io/reference/http/api/
so the next time http-api-docs are re-generated, those changes stay.
2021-03-24 17:41:14 +01:00
7193f950d7 Escape non-printable characters in user output
Replaces control characters and non-printable characters with escape sequences, in any fields that are printed by the CLI, which could have been user input.

Output from `ipfs cat` is unchanged.
2020-12-17 18:16:34 -08:00
cac753bb18 fix build on Plan 9
Fixes #7575
Fixes #7671
2020-09-23 22:27:01 -04:00
c532cb4d5a Document add behavior when the daemon is not running 2020-06-27 15:57:18 -03:00
62de9ba9d3 feat(file-ignore): add ignore opts to add cmd
- add the `gitignore` or `ignore options to the add command
2020-03-20 09:22:04 -07:00
bddd8287d4 doc(add): document hash stability
fixes #4318
2020-02-11 09:29:30 -08:00
a53d48059b fix: migrate from deprecated warning function 2020-01-28 21:20:21 -08:00
76d2ad404d Add buzhash to ipfs add docs
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-10-07 19:57:43 +02:00
5f64b270f8 cmdkit -> cmds
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-05-10 23:00:20 -07:00
6ffdce8abf add: return error from iterator
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-27 18:10:38 +02:00
aa0704e61a add: fix wrap with multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-25 15:23:55 +02:00
0b9e89ddfe add: fix adding multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-25 15:03:47 +02:00
1f293eff1b chore: fix a bunch of issues caught by golangci-lint
Most of these are probably harmless but a few looked like they might actually be
bugs. Most of them are just faulty tests.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-03-29 11:57:45 +00:00
a94d3b7ecd add: gofmt
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-22 00:52:45 +01:00
9919528505 add: move stdin-name handling to cmds
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-22 00:45:35 +01:00
964ef0b2e7 unixfs add: remove StdinName
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-21 19:20:24 +01:00
150fa15bd6 add: gofmt
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-21 19:19:54 +01:00
c5b81e918f coreapi: remove hidden file handling in add
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-21 19:17:58 +01:00
b8bc26a700 WIP almost working ipfs add
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-03-21 19:17:58 +01:00
ddd573e580 gomod: use cheggaa/pb from gopkg
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:58 +01:00
42e191c017 gx: unrewrite
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:56 +01:00
3fa1bfe1bc gx: update cmds and flatfs
fixes #6028, fixes crash when writing after closing on flatfs.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-03-01 12:17:49 -08:00
f227862e88 gx: update go-ipfs-cmds, go-bitswap, go-libp2p-kad-dht, and go-mplex
Fixes the latest batch of bugs found in RC testing.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-27 12:39:24 -08:00
6972a9aa4d Gx Bubble. libp2p-6.0.38
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-02-27 01:10:59 +00:00
3c2536dd81 gx: update go-ipfs-cmds
fixes #6021

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-25 16:45:43 -07:00
fea7ae727f gx: update go-cid
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-20 20:29:06 -08:00
f924f57c61 gx: update go-bitswap and go-libp2p-kad-dht
* go-bitswap: fix some race conditions.
* go-libp2p-kad-dht: fix a goroutine leak.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-20 17:19:54 -08:00