All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org,
	"Michael J Gruber" <git@drmicha.warpmail.net>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Björn Steinbrink" <B.Steinbrink@gmx.de>,
	"Pete Wyckoff" <pw@padd.com>
Subject: Re: [PATCH] Introduce <branch>@{tracked} as shortcut to the tracked branch
Date: Thu, 10 Sep 2009 12:59:47 +0200	[thread overview]
Message-ID: <4AA8DC23.6050500@drmicha.warpmail.net> (raw)
In-Reply-To: <200909101218.06789.johan@herland.net>

Johan Herland venit, vidit, dixit 10.09.2009 12:18:
> On Thursday 10 September 2009, Michael J Gruber wrote:
>> Johannes Schindelin venit, vidit, dixit 10.09.2009 11:36:
>>> Often, it is quite interesting to inspect the branch tracked by a
>>> given branch.  This patch introduces a nice notation to get at the
>>> tracked branch: '<branch>@{tracked}' can be used to access that
>>> tracked branch.
>>>
>>> A special shortcut '@{tracked}' refers to the branch tracked by the
>>> current branch.
>>
>> Sorry, I didn't know the name of the long form was up for discussion.
>> But it should certainly coincide with the key which for-each-ref
>> uses, shouldn't it? I don't care whether tracked or upstream, but
>> for-each-ref's "upstream" has set the precedent.
> 
> ...and 'git branch --track' set an even earlier precedent...

an unfortunate one, yes. It brings us back to an old discussion. The
consensus was what's in the glossary:

       tracking branch
           A regular git branch that is used to follow changes from
another repository. A tracking branch should
           not contain direct modifications or have local commits made
to it. A tracking branch can usually be
           identified as the right-hand-side ref in a Pull: refspec.

I.e., a tracking branch is something under refs/remotes/ (usually; I'll
use that simplification).

If I checkout -b myworkonit refs/remotes/origin/theirstuff then
myworkonit *does not track* origin/theirstuff according to the glossary
(but git checkout says so, unfortunately, and the option is named
likewise); rather, it has origin/theirstuff as its upstream.

In fact, refs/remotes/origin/theirstuff tracks whatever the name is on
the left hand side of the correspondig fetch refspec.

Maybe this is a good time to either

- change the definition of "tracking branch" (to one having an upstream
which is in refs/remotes/; and call "remote upbranch" what's in
refs/remotes/) or
- rename the option and output of git checkout -b/git branch --track.

Accordingly, either tracked or something else (such as upstream) would
be appropriate for the for-each-ref key and the ref specifier.

Cheers,
Michael

  reply	other threads:[~2009-09-10 11:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 13:54 tracking branch for a rebase Pete Wyckoff
2009-09-04 14:31 ` Michael J Gruber
2009-09-04 18:18   ` Jeff King
2009-09-04 18:59     ` Björn Steinbrink
2009-09-05  6:12       ` Jeff King
2009-09-05 14:01         ` Björn Steinbrink
2009-09-05 14:28           ` Jeff King
2009-09-07  5:05             ` Junio C Hamano
2009-09-07  8:14               ` Michael J Gruber
2009-09-07  8:25                 ` Junio C Hamano
2009-09-07  8:44                   ` Jeff King
2009-09-07  9:06                     ` Michael J Gruber
2009-09-07  8:43               ` Jeff King
2009-09-07  9:29                 ` Johannes Schindelin
2009-09-07  9:53                   ` Michael J Gruber
2009-09-08 23:17                     ` Julian Phillips
2009-09-09 10:45                   ` Jeff King
2009-09-10  6:42                     ` Junio C Hamano
2009-09-10  7:47                       ` Johannes Schindelin
2009-09-10  9:36                         ` [PATCH] Introduce <branch>@{tracked} as shortcut to the tracked branch Johannes Schindelin
2009-09-10  9:44                           ` Michael J Gruber
2009-09-10 10:14                             ` Johannes Schindelin
2009-09-10 10:18                             ` Johan Herland
2009-09-10 10:59                               ` Michael J Gruber [this message]
2009-09-10 12:29                                 ` Johan Herland
2009-09-10 13:35                                   ` Johannes Schindelin
2009-09-10 14:17                                     ` Michael J Gruber
2009-09-10 11:11                               ` Jeff King
2009-09-10 18:29                                 ` Junio C Hamano
2009-10-02 14:54                                   ` Björn Steinbrink
2009-09-10 14:16                           ` Jeff King
2009-09-10 14:26                             ` Jeff King
2009-09-10 15:24                               ` Johannes Schindelin
2009-09-10 15:25                                 ` [PATCH v2] Introduce <branch>@{upstream} " Johannes Schindelin
2009-09-10 15:55                                   ` Jeff King
2009-09-10 16:18                                     ` Johannes Schindelin
2009-09-10 15:22                             ` [PATCH] Introduce <branch>@{tracked} " Johannes Schindelin
2009-09-11  4:54                         ` tracking branch for a rebase Junio C Hamano
2009-09-05 17:59           ` 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=4AA8DC23.6050500@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=B.Steinbrink@gmx.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@herland.net \
    --cc=peff@peff.net \
    --cc=pw@padd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.