Re: [PATCH] branch: do not attempt to track HEAD implicitly
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Dec 15, 2010, 15:26 UTC
- Message-ID
- <201012151626.35366.trast@student.ethz.ch>
- In-Reply-To
- <AANLkTi=PPx-pLEeR4gLw0KzV_=ZnuqqH_CGc6L7RzU7M@mail.gmail.com>
Martin von Zweigbergk wrote:
Show 8 quoted lines
> On Tue, Dec 14, 2010 at 1:38 PM, Thomas Rast <trast@student.ethz.ch> wrote: > > 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?
Good point. It seems HEAD wins the dwim_ref() over the rest:
$ g rev-parse HEAD ORIG_HEAD FETCH_HEAD 79f9a226d33659f0e6a69429931d66b5f70c9708 79f9a226d33659f0e6a69429931d66b5f70c9708 79f9a226d33659f0e6a69429931d66b5f70c9708 $ g branch test $ g config -l | grep branch.test.
Not sure through which mechanism, however.
--
Thomas Rast
trast@{inf,student}.ethz.ch