tag v1.11.1

This new release of hub doesn't bring any bug fixes, only performance fixes. Version 1.11.0 made hub much faster compared to previous versions; this release makes it even faster.

This benchmark on Ruby 2.0.0-p247 demonstrates a 63 ms speedup for the hub browse command:

mean (s) stdev (s)
hub browse -u v1.11.0 0.134 0.007
v1.11.1 0.071 0.004

The speed gains were available in several areas:

  • When shelling out to git, hub used to silence stderr like so: cmd 2>/dev/null. Turns out, the mere presence of shell redirection syntax added a few milliseconds per call. Now there is no shell redirection, and hub simply silences STDERR from Ruby.
  • Reduce the number of shelling out to git across the board. Each git invocation takes 5–7 ms, and since we did that a lot, it added a lot of overhead at runtime. When possible, some shelling out was replaced by simply inspecting the files under the .git/ directory. In other cases, duplicate and similar calls were consolidated, and necessary calls are now done lazily, only when absolutely needed.
  • Reduced features in SshConfig, which is an ssh_config(5) parser that we use for resolving ssh aliases to full hostnames. SshConfig did too much and used to implement features that we never took advantage of, so I reduced it to a bare minimum which greatly increased parsing speed.

项目简介

A command-line tool that makes git easier to use with GitHub.

🚀 Github 镜像仓库 🚀

源项目地址

https://github.com/github/hub

发行版本 60

hub 2.14.2

全部发行版

贡献者 206

全部贡献者

开发语言

  • Go 49.4 %
  • Gherkin 39.8 %
  • Shell 5.4 %
  • Ruby 4.2 %
  • Makefile 0.3 %