Skip to content
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

ipfs files stat buggy default format? #3127

Open
jbenet opened this issue Aug 26, 2016 · 2 comments
Open

ipfs files stat buggy default format? #3127

jbenet opened this issue Aug 26, 2016 · 2 comments
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) status/deferred Conscious decision to pause or backlog

Comments

@jbenet
Copy link
Member

jbenet commented Aug 26, 2016

Version/Platform/Processor information (from ipfs version --all):

0.4.3-rc3

Type (bug, feature, meta, test failure, question): bug
Area (api, commands, daemon, fuse, etc): commands / files
Priority (from P0: functioning, to P4: operations on fire): P1
Description:

SHOULD BE

> ipfs files stat /Makefile
Hash: QmTpkPUNCEqQwhNkR78zpc2WiwkQUxKi2G6yaB1THReX8y
Size: 4416
CumulativeSize: 4480
ChildBlocks: 1
Type: file

BUT IS

> ipfs files stat /Makefile
QmTpkPUNCEqQwhNkR78zpc2WiwkQUxKi2G6yaB1THReX8y
Size: 4416
CumulativeSize: 4480
ChildBlocks: 1
Type: file

See here: https://github.com/ipfs/go-ipfs/pull/2706/files#r76372532

@jbenet jbenet changed the title ipfs files stat buggy format. ipfs files stat buggy default format Aug 26, 2016
@jbenet jbenet changed the title ipfs files stat buggy default format ipfs files stat buggy default format? Aug 26, 2016
@Kubuxu
Copy link
Member

Kubuxu commented Aug 26, 2016

My comment on that thread:

It was so you could do ipfs files stat /file | head -1 to get the hash before format options were a thing. Changing it breaks CLI compatibility.

@jbenet
Copy link
Member Author

jbenet commented Aug 26, 2016

Seems like it's been this way since 38fab91 -- Sep 2015.

Okay, this is relatively minor and only increases BP by a few points. To fix it though, i suggest:

  • Add a format keyword (like hash and size) that shows it with Hash: <hash>. maybe --kv-format
  • Add a keyword for current default version too (no Hash: prefix, maybe legacy?). maybe --legacy-format
  • After that, we can change the default with a deprecation warning, and after some length of time passes.

Other:

  • Glad the tests now use --hash

@em-ly em-ly added the kind/bug A bug in existing code (including security flaws) label Aug 29, 2016
@whyrusleeping whyrusleeping added the help wanted Seeking public contribution on this issue label Sep 14, 2016
@flyingzumwalt flyingzumwalt added the status/deferred Conscious decision to pause or backlog label Sep 26, 2016
@whyrusleeping whyrusleeping added status/ready Ready to be worked and removed status/deferred Conscious decision to pause or backlog labels Dec 9, 2016
@Stebalien Stebalien added status/deferred Conscious decision to pause or backlog and removed status/ready Ready to be worked labels Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) status/deferred Conscious decision to pause or backlog
Projects
None yet
Development

No branches or pull requests

6 participants