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

fix parsing for paths of format <hash>/path #1475

Merged
merged 4 commits into from
Jul 14, 2015
Merged

fix parsing for paths of format <hash>/path #1475

merged 4 commits into from
Jul 14, 2015

Conversation

whyrusleeping
Copy link
Member

with this we can now do

ipfs object stat <hash>/a/b/c

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@wking
Copy link
Contributor

wking commented Jul 14, 2015

On Tue, Jul 14, 2015 at 12:02:39PM -0700, Jeromy Johnson wrote:

ipfs object stat /a/b/c

We could do that before (because len(parts) > 3). This commit just
lets us do:

$ ipfs object stat /a

Anyhow, the change itself (and tests :) look good to me.

@@ -114,6 +114,19 @@ test_object_cmd() {
test_cmp hwfile hwfile_out
'

test_expect_success "ipfs object stat path succeeds" '
ipfs object stat $(cat multi_patch)/a/b/c > obj_stat_out
'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add this specific case too?

ipfs object stat $(cat multi_patch)/a > obj_stat_out_a

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, true

@jbenet
Copy link
Member

jbenet commented Jul 14, 2015

LGTM. one comment above based on @wking's observation o/

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@jbenet
Copy link
Member

jbenet commented Jul 14, 2015

LGTM 👍

jbenet added a commit that referenced this pull request Jul 14, 2015
fix parsing for paths of format <hash>/path
@jbenet jbenet merged commit 88ec46e into master Jul 14, 2015
@jbenet jbenet deleted the fix/path-parse branch July 14, 2015 23:28
@jbenet jbenet removed the status/in-progress In progress label Jul 14, 2015
@jbenet jbenet modified the milestone: IPFS 0.3.6 Jul 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants