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

Add ipfs refs options to ipfs refs local #3011

Open
JesseWeinstein opened this issue Jul 29, 2016 · 4 comments
Open

Add ipfs refs options to ipfs refs local #3011

JesseWeinstein opened this issue Jul 29, 2016 · 4 comments
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue topic/commands Topic commands

Comments

@JesseWeinstein
Copy link
Contributor

Type: feature
Area: commands
Priority: P0

It would be nice for ipfs refs local to take the same options as ipfs refs. You can jury-rig the effect by combining existing commands, but it'd be nicer if using the options just worked.

@JesseWeinstein
Copy link
Contributor Author

I'm interested in working on this, but I'm not sure when I'll get to it.

@whyrusleeping whyrusleeping added help wanted Seeking public contribution on this issue topic/commands Topic commands exp/novice Someone with a little familiarity can pick up labels Aug 4, 2016
@ryco117
Copy link

ryco117 commented Aug 7, 2017

Hi, I'm looking to contribute to ipfs and this seems like a fairly simple issue to start familiarizing myself with the codebase. It seems to me that the optionsMap check in commands/command.go GetOptions will disallow refs and its subcommand local from using the option names since it traverses the cmd path and adds the available options at each point to the map... Am I missing something or would "refs local" need to be renamed (something like) "refs-local" in order to use the same options/flags as regular "refs"

@whyrusleeping
Copy link
Member

@ryco117 I think the best way to resolve this issue would be to simply duplicate some of the flags from ipfs refs into ipfs refs local. You don't want all of them (for example, -r and -u don't really make sense) but some of them would be good.

@ryco117
Copy link

ryco117 commented Sep 4, 2017

@whyrusleeping Hi, thanks for the response. Duplicating the args is exactly what I did, but refs local was rendered unusable since it triggered the return nil, fmt.Errorf("Option name '%s' used multiple times", name) in commands/command.go . This is because GetOptions "returns the options in the given path of commands" and doesn't seem to like the same args appearing multiple times in the cmd tree. Any clarification would be highly appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

3 participants