shithub: git9

Download patch

ref: ba26692dbfcbea5231d02edd318a5dfbf8f22db3
parent: 221e7c96b417e63b291f83714d9dbcbb253a2e4b
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Dec 9 12:54:52 EST 2020

git/branch: implcitly create local branch off origin

Currently, creating a local branch off a remote one requires
passing the '-nb origin/$branch' argument to git/branch.

In addition to being annoying, it opens up the possibility for
human error, since passing this argument for an existing branch
will clobber it.

After this change, a repo in this state:

	% git/branch -a
	heads/master
	remote/origin/master
	remote/origin/foo

will switch to heads/master when running:

	% git/branch master

but will create a new branch foo, based off origin/foo,
when running:

	% git/branch foo