Skip to content

Releases: mislav/hub

hub 2.2.0-rc1

26 Dec 02:06
Compare
Choose a tag to compare
hub 2.2.0-rc1 Pre-release
Pre-release
  • Add csh & tcsh shell support
  • Fix script/build on Windows. For running this, GitHub for Windows command prompt is needed.
  • Fix detecting base branch for pull-request
  • Fix authenticating on GitHub Enterprise
  • Skip looking into SSH config if current URL scheme is http or https
  • Treat remote URL user name case insensitive when creating PR
  • Fix index out of range issue when parsing global flags
  • Remove editor file after pull-request is there’s no title
  • exec the final git command run instead of running it as a subprocess: fixes subtle issues like git pagination getting messed up if parent process is aborted.
  • Don’t trim empty CLI arguments
  • Change authentication process to create a new token every time instead of reading previous one from GitHub API, which is a feature that's going away for security reasons.
  • Avoid showing warning about invalid 2FA code on first prompt
  • URI-encode most characters in branch names for compare command
  • Allow creating "origin" remote in create even if another remote exists
  • Auto-private URLs in remote add when matching your own repos

hub 1.12.4

25 Dec 19:52
Compare
Choose a tag to compare

This is one of the last maintenance releases of the Ruby implementation of hub. The master branch is now rewritten in Go, so for the latest & greatest (and improved speed!) please check out the v2.2 series.

  • Don't try to read existing hub token from GitHub API since that API feature is getting removed for security reasons. Instead, generate a new token each time including the current machine identifier.
  • Ruby 2.2.0 compatibility
  • Enable retrying entering 2FA code if previous one was invalid
  • Friendlier error messages when bad credentials were used
  • Encode special characters in branch names for compare command
  • Auto-private URLs in remote add when matching your own repos

hub 1.12.3

28 Nov 00:40
Compare
Choose a tag to compare
  • Fix hub --noop clone output for repos user has push access to
  • Fix hub browse help output when not in any repo
  • Tweak URI implementation for compatibility with stdlib
  • Ensure branch names with funky characters are shell-escaped

hub 2.2.0-preview1

20 Oct 00:57
Compare
Choose a tag to compare
hub 2.2.0-preview1 Pre-release
Pre-release

This is the first preview release of the Go-powered hub. This marks a milestone where the rewrite of hub in Go that lived in jingweno/gh now became the main implementation.

Why Go? The problem with writing a command-line tool in Ruby is that it's very difficult to make it fast, and Ruby is required to be installed on the system for it to work. The Go executable is both fast and easy to install, since it bundles its own runtime.

The new implementation should be fully backwards compatible. Please file an issue if there's anything not working as expected.

Installation

To try out this prerelease, you have two options:

  1. See the downloads below to get the appropriate binary for your system.

  2. With Homebrew on OS X:

    $ brew install --HEAD hub
    # or:
    $ brew upgrade --HEAD hub

To check a successful install:

$ hub version
git version 1.9.1
hub version 2.2.0-preview1

tumblr_ndrs8dgp2e1s0t69oo1_500

hub 1.12.2

11 Jul 19:11
Compare
Choose a tag to compare
  • Explicitly paginate just help text instead of all output

    Doing so enables us to clear the screen reliably upon exiting the pager
    without risking single-page output being swallowed.

  • Don't allow man page width to exceed 120 characters

  • Show hub <command> -h short usage help on stdout

  • Fix hub browse on detached HEAD

  • Fix hub compare for branch names with slashes in them

  • Fix hub am for Enterprise URLs

hub 1.12.1

23 May 10:07
Compare
Choose a tag to compare

Bugs squashed:

  • Fix checking out a pull request when fork name is different than original repo

    The repository name of the pull request head doesn't necessarily match the name of the project's repository. This can happen when a user forks a project but already has a repository of the same name.

  • Use non-predictable filename for downloaded patch file

    Since the /tmp directory is readable by everybody on Unix, and since the patch name could be public or easy to guess, a attacker could create a symlink to a file writable by the user running hub, which would be replaced by the patch.

    This has been assigned CVE-2014-0177.

  • Fix API 422 error: Duplicate value for "description"

  • Fix "invalid byte sequence" errors in pull-request

    If the user's LANG environment variable doesn't include "UTF-8", the default external encoding in Ruby will be US-ASCII and as such, string operations will fail dealing with pull request message or changelog that
    contains non-ASCII characters.

  • Respect git "core.commentchar" setting in pull-request message

  • Fix displaying output of hub --noop pull-request

    In attempts to make multi-page output from hub get cleared when exiting the pager in the terminal, I've broken outputting short bits of text such as --noop output, which would accidentally get swallowed. This fixes that output, but reverts clearing the terminal scrollback when exiting hub help hub, for instance. I will revisit this in the future.

  • Don't re-wrap default pull request message taken from commit

    Re-wrapping to 78 chars was dangerous since it could lead to moving a #-reference to the beginning of a line which would then get interpreted as a comment.

rtnrxzd

hub 1.12.0

01 Mar 00:25
Compare
Choose a tag to compare

Features:

  • hub pull-request -o (--browse) to open the new pull request in the browser
  • Support Enterprise over non-secure HTTP via protocol option in ~/.config/hub
  • Enable API debug output by setting HUB_VERBOSE environment variable

Bug fixes:

  • Fix reusing old OAuth tokens stored in Authorizations API
  • Allow help pager to clear screen on exit
  • Avoid mispelled pull-request flags getting misinterpreted as title
  • Rescue HTTP exceptions during ci-status command

marceline3

hub 1.11.2

01 Mar 00:28
Compare
Choose a tag to compare
  • Fix hub browse destination when on the master branch
  • Fix hub when a remote has local path instead of URL
  • Fix for hub fork for rare cases where the fork is not year ready to be git fetched
  • Improve extracting title & body in pull-request
  • Escape slashes in hub compare URLs with semicolon

hub 1.11.1 - ridododiculous speeds

26 Dec 00:55
Compare
Choose a tag to compare

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.

hub 1.11 – codename “What Was Missing”

22 Dec 01:24
Compare
Choose a tag to compare

The long-awaited release of hub is here! You spoke and I listened. Needless to say, this is the best release of hub ever.

hub is a command-line wrapper for git executable that extends it with features that improve integration with GitHub.

To install hub:

  • Install from source:

    git clone https://github.com/github/hub.git
    cd hub
    rake install prefix=/usr/local
    
    # run and follow the instructions:
    hub alias
  • Upgrade with Homebrew:

    brew upgrade hub
    

It's faster. Algebraic!

hub is written in Ruby and its execution time was abysmal. It kinda sucks that you're supposed to wrap git with a tool that's an order of magnitude slower than git itself. Well, the good news is that I've made it much faster in the new release:

v1.10.6:

  • hub version - mean: 0.138 ms
  • hub browse -u - mean: 0.191 ms

v1.11.0:

  • hub version - mean: 0.062 ms (76 ms faster)
  • hub browse -u - mean: 0.131 ms (60 ms faster)

I've done that by:

  • --disable-gems flag to the Ruby interpreter to skip loading RubyGems;
  • avoiding loading fileutils and cgi modules, and reimplemented the few methods I need from them;
  • avoiding loading yaml and uri modules, which are slow to load, and implemented a rudimentary YAML serializer/deserializer to handle hub configuration, and a replacement URI::HTTP class which handles simple URLs.

Ready to squish some long-outstanding issues?

  • Enable two-factor authentication (2FA) and email-based GitHub Enterprise login.
  • Detect default branch if named something other than "master", e.g. "develop". If the default branch is not picked up by git automatically on clone, you can explicitly set it once per repo with git remote set-head REMOTE BRANCH.
  • Detect origin remote when named something other than "origin", e.g. "upstream" or "github".
  • Enable cloning of private repos without having to use hub clone -p. hub will use the ssh protocol instead of git protocol for any repo that is private or that you have push access to.

I'm frikkin’ all about pull-request!

  • Improve detecting the implicit head of the pull request. For example, if you have push access to the main repository and you created a branch on it, git pull-request will no longer incorrectly assume that the head should be the same-named branch on your (possibly non-existent) fork.
  • Add support for passing the pull request title & body via command line, file, or standard input via the -m MESSAGE or -F FILE parameters that match those supported by git commit.
  • Deprecate converting issues into pull requests. This functionality is likely to be dropped from GitHub's API.
  • Save and reuse pull-request message if creating one failed.
  • Avoid hard breaks in pull-request message authored in Vim.

New ci-status command. Mathematical!

hub ci-status provides access to GitHub Status API and is useful for checking the outcome of CI builds. It prints the status string on standard output and exits with a non-zero code for any status other than "success". This can be useful in shell scripts, e.g. to abort pushing a release if CI is pending or failing.

$ hub ci-status
success

$ hub ci-status mybranch
pending

$ hub ci-status >/dev/null && rake release

Other improvements

  • hub am: enable fetching pull request and commit patches from private repos
  • Improve zsh and bash shell completions (and even added to CI test suite!)
  • Escape complex branch names in browse URLs
  • Allow --ff-only in merge <PULL-URL>
  • Display hub help hub using all available width of the terminal
  • hub version includes commit SHA when built from git
  • Fix reading from git core.pager when the value contains spaces
  • Expand environment variables in git core.editor value
  • Skip reading ssh_config when no read privileges
  • Lock down to GitHub API v3 for guarding against future changes of their API

Thanks to the contributors ❤️ ✨

Ladios Jonquil, Dave Goodell, Adam Spiers, Yasuharu Ozaki, Timothy Gu, Tekkub, Stuart Nelson, Steven Harman, Shay Frendt, Mindaugas Mozūras, Mike Dougherty, Michiel Sikkes, Maksim Ryzhikov, Lukas Zapletal, Kirill Müller, John Manoogian III, Jo Liss, Jamie Wright, Ivan Tse, Haukur Páll Hallvarðsson, Glenn Gentzke, David Mai, Arturo Herrero, Aaron Stacy. See the contributors graph

missing