Skip to content

Fixed slow behavior when using GitHub wrappers #1887

Merged
merged 1 commit into from Jun 21, 2013

4 participants

@tgkokk
tgkokk commented Jun 12, 2013

See pull github/hub#319. FYI, hub is a wrapper for git that adds some nice features related to GitHub. Any commands it can't handle will be forwarded to the normal git binary. This behavior makes it suitable for aliasing to git. This is also what the github plugin for oh-my-zsh does.

Unfortunately, oh-my-zsh uses $(git) for lib/git.zsh, instead of $(command git). Thus, hub is executed, which is slower than git and isn't needed for what this file does (branch name indicator, dirty working tree indicator etc.).

Comparison between the two:

$ time command git version
git version 1.7.10.4
command git version 0.00s user 0.00s system 70% cpu 0.006 total

$ time hub version
git version 1.7.10.4
hub version 1.10.6
hub version 0.46s user 0.06s system 94% cpu 0.549 total

@tgkokk tgkokk referenced this pull request in github/hub Jun 12, 2013
Closed

Added Oh My ZSH instructions #319

@mislav
mislav commented Jun 13, 2013

👍

@robbyrussell robbyrussell merged commit 0f2b24c into robbyrussell:master Jun 21, 2013
@rymai
rymai commented Jul 3, 2013

Thank you so much for that!

@tgkokk tgkokk deleted the unknown repository branch Jul 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.