Re: [PATCH] branch: do not attempt to track HEAD implicitly
- From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
- Date
- Dec 15, 2010, 00:50 UTC
- Message-ID
- <AANLkTi=PPx-pLEeR4gLw0KzV_=ZnuqqH_CGc6L7RzU7M@mail.gmail.com>
- In-Reply-To
- <6ee1f0174b757e25ab873d2d037545ac7db698ee.1292351886.git.trast@student.ethz.ch>
On Tue, Dec 14, 2010 at 1:38 PM, Thomas Rast <trast@student.ethz.ch> wrote:
Show 6 quoted lines
> With branch.autosetupmerge=always, 'HEAD' becomes a valid target for > branch tracking. This is a bit silly, and in fact the code already > guards against it when attempting it explicitly: > > $ git checkout HEAD^0 > $ g branch -t foo
missing the "it" in "git"
> fatal: Cannot setup tracking information; starting point is not a branch. > > Silently drop the HEAD candidate in the implicit (i.e. without -t > flag) case, so that the branch starts out without an upstream.
Thanks. This has been on my todo list for a while.
Should it only check for HEAD? How about ORIG_HEAD and FETCH_HEAD? Simply anything outside of refs/ maybe? Would that make sense?
/Martin