From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [Bug] branch.*.merge interpreted too strictly by tracking logic
Date: Wed, 5 Feb 2014 15:50:30 -0500 [thread overview]
Message-ID: <20140205205030.GA16394@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqa9e67atv.fsf@gitster.dls.corp.google.com>
On Tue, Feb 04, 2014 at 02:49:16PM -0800, Junio C Hamano wrote:
> Let's tell these branches that they are both supposed to be building
> on top of 'master'.
>
> : gitster track/master; git config branch.foo.remote .
> : gitster track/master; git config branch.foo.merge refs/heads/master
> : gitster track/master; git config branch.bar.remote .
> : gitster track/master; git config branch.bar.merge master
>
> The difference between the two is that 'foo' spells the @{upstream}
> branch in full (which is the recommended practice), while 'bar' is
> loose and asks for 'master'.
Is it legal to put an unqualified ref there? A wise man once said[1]:
> Actually, it is broken in a lot of places. for-each-ref relies on
> the same code as "git status", "git checkout", etc, which will all
> fail to display tracking info. I believe the same code is also used
> for updating tracking branches on push. So I'm not sure if it was
> ever intended to be a valid setting.
It wasn't. Some places may accept them gracefully by either being
extra nice or by accident.
I don't recall us ever doing anything after that. I don't have a problem
with making it work, of course, but I am not sure if it is really a bug.
-Peff
[1] http://thread.gmane.org/gmane.comp.version-control.git/121671
next prev parent reply other threads:[~2014-02-05 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 22:49 [Bug] branch.*.merge interpreted too strictly by tracking logic Junio C Hamano
2014-02-05 20:50 ` Jeff King [this message]
2014-02-05 21:05 ` Junio C Hamano
2014-02-05 21:08 ` Jeff King
2014-02-05 21:10 ` Junio C Hamano
2014-10-14 22:14 ` [PATCH] checkout: report upstream correctly even with loosely defined branch.*.merge 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=20140205205030.GA16394@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).