Re: [PATCH v4] Introduce %<branch> as shortcut to the tracked branch
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Mar 20, 2009, 17:08 UTC
- Message-ID
- <20090320170814.GB24968@atjola.homenet>
- In-Reply-To
- <alpine.DEB.1.00.0903201714020.10279@pacific.mpi-cbg.de>
On 2009.03.20 17:17:01 +0100, Johannes Schindelin wrote:
> Even if a branch name can legally start with a '%' sign, we can use the > special character '%' here, as you can always specify the full ref: > refs/heads/%my-branch (pointed out by doener on IRC).
Hm, I just recalled that "git checkout" doesn't "like" anything but the shortname for a branch, with refs/heads/master or heads/master, you get a detached HEAD. Though at least when reading the doc, that seems like a bug to me. The man page says:
When this parameter names a non-branch (but still a valid commit
object), your HEAD becomes detached.And of course refs/heads/master names a branch. Is it expected/intended that checkout detaches HEAD anyway when given a full ref name?
Björn