From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Santi_B=E9jar?= Subject: Re: [RFC/PATCH 1/2] remote tracking: return the tracking branch for the given branches Date: Thu, 18 Jun 2009 15:22:30 +0200 Message-ID: References: <1245311834-5290-1-git-send-email-santi@agolina.net> <1245311834-5290-2-git-send-email-santi@agolina.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org To: Johannes Schindelin X-From: git-owner@vger.kernel.org Thu Jun 18 15:22:41 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1MHHZg-000073-E3 for gcvg-git-2@gmane.org; Thu, 18 Jun 2009 15:22:40 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761503AbZFRNWa convert rfc822-to-quoted-printable (ORCPT ); Thu, 18 Jun 2009 09:22:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761302AbZFRNW3 (ORCPT ); Thu, 18 Jun 2009 09:22:29 -0400 Received: from mail-bw0-f213.google.com ([209.85.218.213]:51915 "EHLO mail-bw0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761144AbZFRNW2 convert rfc822-to-8bit (ORCPT ); Thu, 18 Jun 2009 09:22:28 -0400 Received: by bwz9 with SMTP id 9so1057399bwz.37 for ; Thu, 18 Jun 2009 06:22:30 -0700 (PDT) Received: by 10.204.61.209 with SMTP id u17mr1363792bkh.86.1245331350499; Thu, 18 Jun 2009 06:22:30 -0700 (PDT) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 2009/6/18 Johannes Schindelin : > Hi, > > On Thu, 18 Jun 2009, Santi B=E9jar wrote: > >> diff --git a/Documentation/git-remote.txt b/Documentation/git-remote= =2Etxt >> index 9e2b4ea..e444899 100644 >> --- a/Documentation/git-remote.txt >> +++ b/Documentation/git-remote.txt >> @@ -17,6 +17,7 @@ SYNOPSIS >> 'git remote show' [-n] >> 'git remote prune' [-n | --dry-run] >> 'git remote update' [-p | --prune] [group | remote]... >> +'git remote tracking' ... >> >> DESCRIPTION >> ----------- >> @@ -128,6 +129,12 @@ be updated. (See linkgit:git-config[1]). >> + >> With `--prune` option, prune all the remotes that are updated. >> >> +'tracking':: >> + >> +Returns the tracking branch for the given remote () and branc= h >> +(). Note that must exactly match the left hand sid= e of >> +the refspec of the given remote. >> + > > From that description, it is not clear to me if the branch is the _re= mote_ > branch, the branch _on_ the remote, or the local branch. OK. s/and branch/and remote branch/ > > If it is the remote branch (or the branch on the remote), I wonder ho= w you > deal with ambiguities, as I can easily create hundreds of branches > tracking the same remote branch. AFAICS from remote_find_tracking (and some tests), it picks the first m= atch. So, additional text could be: In case of multiple matches, it picks the first one. Santi