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

Use hub when available #24

Closed
pbrisbin opened this issue Nov 25, 2013 · 3 comments
Closed

Use hub when available #24

pbrisbin opened this issue Nov 25, 2013 · 3 comments
Labels

Comments

@pbrisbin
Copy link
Contributor

Hub's a pretty large part of my git workflow, should the script check for / use hub?

It could be smart about trying hub only on unrecognized commands.

@georgebrock
Copy link
Collaborator

The hub README recommends aliasing hub as git. Since it's meant to be a replacement for git with added sugar, it might make sense to provide hub support by letting the user run all gitsh commands through hub instead of git.

At its simplest, this could be a git config setting (gitsh.gitBinary?) which could be pointed to the hub executable.

We could also get fancy and follow the lead of programs like vim by providing two executables: gitsh would run everything through git, hubsh would run everything through hub.

@pbrisbin
Copy link
Contributor Author

Indeed, I have such an alias and I like the gitsh/hubsh idea since the usage would be completely analogous to what I do with git/hub and I would just set up the same sort of alias.

My reasoning for suggesting we only call hub on unrecognized commands is that hub is slower (slightly, but noticeably so) than git. Making things conditional such that hub is only called when needed is annoying in shell, thus the always-hub alias is preferable; however, since we're in ruby-land now, I thought maybe we could have that logic more elegantly.

@georgebrock
Copy link
Collaborator

For now, let's aim to support the very aliasable gitsh --git=/path/to/hub. If it proves to be slow in practice, we can look into deeper integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants