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 refs --recursive --unique is not recursive #1211

Closed
MichaelMure opened this issue May 8, 2015 · 6 comments
Closed

ipfs refs --recursive --unique is not recursive #1211

MichaelMure opened this issue May 8, 2015 · 6 comments
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands

Comments

@MichaelMure
Copy link
Contributor

$ ipfs refs --recursive Qmb8Hct2kCaPskyDuY9e6V9pUUUBAPMinZXAyVj9CrELk2
QmcM14fEAVpJpJ8ymvG4HtEz8N29iEyJBYm7vRWhjtaBJk
QmToBjWSFNGFngp641WZGJBMiY3JUMiG6KvTp26hMrrLVU
Qmc3RTuTfmtDXtDto8v7iScQfeCtsPUQ1ednfwStMoQh1r
QmSwiFcSfTMiBwG6P6JwQ9HtU6tyAYiCJQujf88HQxeJhF
QmVP3RnEXpsm5onMwGivopoFx1iFWKX5e4z7s1hDTb6c8r
QmaPqrCjCfNdyCEkc3RTA5AYWfEaD6jTrExoNrRutnsRW3

....

QmS1gt76QqZsN222f5ZciAHADLZLcStoXofrU9HqNs5938
QmYSdPJVuSzChf1Ku3iiAEExBus4qfK1W9e7oHjm4mu8Ef
QmZiqP1CjAVetDEteox9WJUJDSiGwVMQnecUidA5dqQYcx
QmNYXefsUHmjyhK4cr3Y562nhc9zNPtxpvuNxz2iEHRVNJ
QmX1UQiMYPTpkvvV9So93jb5pYdKiuKhaGZEwckGe9GSji
QmVSdELUEUUg5aPo1G7DwZtEVW2Mwdfc8pEdCEtPqArmeG

$ ipfs refs --recursive --unique Qmb8Hct2kCaPskyDuY9e6V9pUUUBAPMinZXAyVj9CrELk2
QmcM14fEAVpJpJ8ymvG4HtEz8N29iEyJBYm7vRWhjtaBJk
QmdqDBerv9hnC445NDuA7q9tfE6JL24rmPDC3MV3X63V5T

When using --recursive and --unique, only the direct childs in the dag are listed. I would expect all the childs (recursive), but deduplicated

@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/commands Topic commands labels May 9, 2015
@jbenet
Copy link
Member

jbenet commented May 9, 2015

@MichaelMure was this fixed with #1212 ?

@MichaelMure
Copy link
Contributor Author

Just updated my master, it's still here.

@gatesvp
Copy link
Contributor

gatesvp commented Jul 6, 2015

I could not download the original hash listed in the ticket, but I did manage to repro this locally with some experimentation.

I think the fix is relatively simple, we just need to kill this if statement: https://github.com/ipfs/go-ipfs/blob/master/core/commands/refs.go#L235

That stated, this probably deserves some extra sharness tests because there's nothing really covering this type of bug. I will cook this up shortly.

@jbenet
Copy link
Member

jbenet commented Jul 6, 2015

I think the fix is relatively simple, we just need to kill this if statement: https://github.com/ipfs/go-ipfs/blob/master/core/commands/refs.go#L235

sounds right to me

gatesvp added a commit to gatesvp/go-ipfs that referenced this issue Jul 28, 2015
License: MIT
Signed-off-by: Gaetan Voyer-Perrault <gatesvp@gmail.com>
jbenet pushed a commit that referenced this issue Jul 28, 2015
License: MIT
Signed-off-by: Gaetan Voyer-Perrault <gatesvp@gmail.com>
@MichaelMure
Copy link
Contributor Author

Just tested, this is fixed. I guess the good thing is to close the bug. Thanks !

@jbenet jbenet removed the backlog label Aug 6, 2015
@jbenet
Copy link
Member

jbenet commented Aug 6, 2015

👍

kbala444 pushed a commit to kbala444/go-ipfs that referenced this issue Aug 15, 2015
License: MIT
Signed-off-by: Gaetan Voyer-Perrault <gatesvp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

4 participants