-
-
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
core/commands: pin ls: display types by default #1138
core/commands: pin ls: display types by default #1138
Conversation
Code changes LGTM 👍 This PR (obviously) changes the output of the |
Wow! That was fast, specially for a Saturday 😄 @cryptix I was looking into that, but I'm not sure what's the correct fix. For example, this test:
The issue is because we're comparing the output of
I feel the latter is the best way to go for now, am I right? There's also other test cases, like:
That are more complicated. I'm not sure why the same hashes are returned with different types. Any ideas? |
Will take a deeper look later today but so far: ideally would add the --quiet / -q flag as other commands have. With quiet on, only the hash should be output (as it is now) — On Sat, Apr 25, 2015 at 11:06 AM, Vitor Baptista notifications@github.com
|
And thanks very much for the PR! :) — On Sat, Apr 25, 2015 at 11:06 AM, Vitor Baptista notifications@github.com
|
your Go code looks just fine to me! 👍 For the first test failure, having a for the second, It looks like |
@jbenet Instead of adding a
The |
👍 to verbose. |
The build is mostly green, apart from a |
yeah, we have a couple tests that fail occasionally, mostly due to port conflicts on travis |
This looks good to me, ill wait on @jbenet's approval for the merge |
@vitorbaptista thanks so much for the PR!! 👏 👏 👏 👏
we picked this up from git. git itself isn't consistent (opting for In the long run I want:
I don't care for the word specifically, but I think
Yeah, this is a "give me way more output to debug things" type of request. Whether this (the pin output) qualifies as "normal or verbose outputs ({,-v}" or "normal or crucial outputs {,-q}" is tricky, but looking at other commands like Sorry to be pedantic about this, but this sort of UX really matters. consistency, clarity, and intuitiveness are all important. also important to consider not breaking userspace, which already uses -q for this. |
42d68c0
to
f6268bf
Compare
@jbenet Big +1 to trying to keep the interface consistent. I've changed it to be I don't like the way I fixed the tests. I would rather fix the expected output instead of simply changing everything to call |
thanks!
Yeah, tests for the |
9a14ab8
to
a356d0b
Compare
@jbenet So I rebased to the current upstream to avoid some merge conflicts. Also, I changed the tests to avoid using Unfortunately, I was unable to make the last test Indirectly, it's testing both |
👍
Since this is better than what's there, we could merge this now and do the rest in the future. The test failuers are:
|
a356d0b
to
3ae22f7
Compare
@jbenet I've just fixed the tests. The issue was just a small difference between |
@vitorbaptista sorry to bother with this, but we need all commits to pass the tests, because we want git bisect to work well to debug problems. you can run all tests on every commit locally with:
(take a look at what it does). feel free to squash commits together -- we care more about atomic logical commits than historical ones. |
3ae22f7
to
d008e95
Compare
If you want to get only the hashes (i.e. the previous behaviour), you can use the `--quiet` flag.
d008e95
to
5d1a25b
Compare
@jbenet Oh, sorry! I've just squashed them all. That's a great policy, btw. I'll adopt it on my own projects from now on. |
core/commands: pin ls: display types by default
thanks @vitorbaptista ! 👏 |
Thanks! I know that specially for small patches like this PR, it's easier to simply go ahead and write the changes yourself. It requires great patience to review the code (and set up easy-to-do issues on the first place), but it's a great way to foster a community. Given the number of contributions you have, you seem to be doing well. I wish you luck. You're doing an amazing project! |
Thanks! yeah, we want to create a very approachable environment. some things aren't (like parts of our codebase), but we're trying to get better. we care to make the project open and fun for everyone :)
thanks again!! |
Please bear with me as these are my first lines of Go code 😄
This fixes issue #1134
I tried following the convention on other files (for example, I named the struct
RefKeyObject
following the pattern onLsObject
), but let me know if I got something wrong.It follows the usage pattern @jbenet described in the issue:
I couldn't find a
--quiet
option onpin ls
, though, so there might be something missing.The
golint
complains about a few things in this file:But as it's already complaining about other similar things, I'm assuming this is a known issue and you've chosen to ignore it.
If there's any problem with the code, please tell me and I'll be happy to fix it.
Congratulations on IPFS! It's an amazing project.