From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] branch: do not attempt to track HEAD implicitly
Date: Wed, 15 Dec 2010 19:30:04 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.1.10.1012151909410.25560@debian> (raw)
In-Reply-To: <201012151626.35366.trast@student.ethz.ch>
On Wed, 15 Dec 2010, Thomas Rast wrote:
> Martin von Zweigbergk wrote:
> > 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
Probably a stupid question, but why are all three of them pointing to
the same commit? I guess that is what you want to show, but how did
you get there? If I run the same command (I assume your 'g' alias
simply calls git), I get three different commits (in general, of
course).
> $ g branch test
> $ g config -l | grep branch.test.
>
> Not sure through which mechanism, however.
The scenario I meant is the following:
$ git config branch.autosetupmerge always
$ git branch test ORIG_HEAD
Branch test set up to track local ref ORIG_HEAD.
$ git config -l | grep branch.test
branch.test.remote=.
branch.test.merge=ORIG_HEAD
/Martin
next prev parent reply other threads:[~2010-12-16 0:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-14 18:38 [PATCH] branch: do not attempt to track HEAD implicitly Thomas Rast
2010-12-15 0:50 ` Martin von Zweigbergk
2010-12-15 15:26 ` Thomas Rast
2010-12-15 18:30 ` Martin von Zweigbergk [this message]
2010-12-17 5:55 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.10.1012151909410.25560@debian \
--to=martin.von.zweigbergk@gmail.com \
--cc=git@vger.kernel.org \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).