-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support optional pin names #10261
Conversation
79c90b7
to
fec88d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hacdias thank you, I've tested locally, added JSON tests (/api/v0
wire format and --enc=json
) and some --help
text.
I think this is good to go, as long you address cosmetics:
-
see if we can makepins: allow 'ipfs pin add --name' to override name #10277ipfs pin add --name
update name of pre-existing pin (if too involved, let's ship as-is) - rename
pin ls --detailed
topin ls --names
(but also ok to ignore this suggestion if you feel detailed is better ux)
core/commands/pin/pin.go
Outdated
- Pin add is idempotent: pinning CID which is already pinned won't change | ||
the name, value passed with '--name' with the original pin is preserved. | ||
To rename pin, use 'pin rm' and 'pin add --name'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hacdias I've added this because running ipfs pin add --name A CID
and then ipfs pin add --name B CID
does not update the name (it is still A
).
If you feel we could get follow-up calls update the name withoiut huge refactor, that would be preferable, and we could remove this awkward caveat sentence.
@lidel I updated to |
Closes #4586. Requires ipfs/boxo#525.
A name will apply to all CIDs being pinned. So if you
ipfs pin add --label A [CID1] [CID2] [...]
, all CIDs will have label "A".