-
-
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
ipfs files ls without -l is faster #2007
Conversation
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
IT'S SO FAST! :D <3 |
@@ -235,14 +235,33 @@ Examples: | |||
return | |||
} | |||
|
|||
long, _, _ := req.Option("l").Bool() |
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.
should this be a proper argument? makes it appear in --help and also makes it easier to find the options this accepts, when reading the code
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.
i think it is already one -- https://github.com/ipfs/go-ipfs/pull/2007/files#diff-1feff21640e90e71a5ec9ccec2650fbdR217
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.
oh right, this only reads the option, i mistook it for its definition
@whyrusleeping surprised this didnt break sharness tests-- are there none for this? |
@whyrusleeping this LGTM, but before-- what are example outputs? (or, will see it in the sharness test) |
@jbenet there will be no noticeable difference in the output of the commands, all thats happening here is that we skip fetching each child node in the case where the caller doesnt care about types (when -l is not specified) |
Ah ok, so only the JSON output changes, but commands remain the same. ok LGTM |
ipfs files ls without -l is faster
dont check types of child entries if
-l
isnt specified.License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com