All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Santi Béjar" <santi@agolina.net>
Cc: Jakub Narebski <jnareb@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: [RFC/PATCH 1/2] remote tracking: return the tracking branch for  the given branches
Date: Thu, 18 Jun 2009 12:19:12 -0700	[thread overview]
Message-ID: <7v63etnydr.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <adf1fd3d0906181201r5f3b2f55t8427e7be5ba07e9a@mail.gmail.com> ("Santi Béjar"'s message of "Thu\, 18 Jun 2009 21\:01\:55 +0200")

Santi Béjar <santi@agolina.net> writes:

> One thing it just occurred to me is to return the explicit refspec
> instead of the tracking branch. So with the default config (after a
> clone):
>
> $ git remote tracking origin refs/heads/master
> refs/heads/master:refs/remotes/origin/master

I think the output is sensible, instead of saying something like
'origin/master'.

We can and should allow the end users to use abbreviated form as input to
us (either command line or configuration value) when it is unambiguous,
but when returning values for use by Porcelains, we should be strict and
precise to avoid ambiguities.

> this makes a difference in case we want to allow returning all the
> matching tracking branch and not the first one with more than one
> branch, as:
>
> $ git config remote.origin.fetch --add +refs/heads/*:refs/remote/another/*
>
> $ git remote tracking origin refs/heads/master
> refs/heads/master:refs/remotes/origin/master
> refs/heads/next:refs/remotes/origin/next

I am not sure what this example is doing.  You asked about refs/heads/master
but you also talk about refs/heads/next?   I guess you meant to say

    $ git remote tracking origin refs/heads/master
    refs/heads/master:refs/remotes/origin/master
    refs/heads/master:refs/remotes/another/master

instead, judging from the next example?

> $ git remote tracking origin refs/heads/master refs/heads/next
> refs/heads/master:refs/remotes/origin/master
> refs/heads/master:refs/remotes/another/master
> refs/heads/next:refs/remotes/origin/next
> refs/heads/next:refs/remotes/another/next

  reply	other threads:[~2009-06-18 19:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  7:57 [RFC/PATCH 0/2] Support for arbitrary mapping for "git pull --rebase" Santi Béjar
2009-06-18  7:57 ` [RFC/PATCH 1/2] remote tracking: return the tracking branch for the given branches Santi Béjar
2009-06-18 11:52   ` Paolo Bonzini
2009-06-18 13:23     ` Santi Béjar
2009-06-18 12:35   ` Johannes Schindelin
2009-06-18 13:22     ` Santi Béjar
2009-06-18 13:44       ` Jakub Narebski
2009-06-18 13:55         ` Santi Béjar
2009-06-18 14:17           ` Jakub Narebski
2009-06-18 14:40             ` Santi Béjar
2009-06-18 19:01               ` Santi Béjar
2009-06-18 19:19                 ` Junio C Hamano [this message]
2009-06-18 21:31                   ` Santi Béjar
2009-06-18  7:57 ` branch.<branch>.merge and --format='%(upstream)' Santi Béjar
2009-06-18  7:57 ` [RFC/PATCH 2/2] get_remote_merge_branch: Support for arbitrary mapping Santi Béjar
2009-06-18  9:27   ` Santi Béjar
2009-06-18  8:41 ` [RFC/PATCH 0/2] Support for arbitrary mapping for "git pull --rebase" Johannes Schindelin
2009-06-18  9:24   ` Santi Béjar
2009-06-19 13:42     ` Santi Béjar

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=7v63etnydr.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=santi@agolina.net \
    /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.