git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <santi@agolina.net>
To: git@vger.kernel.org
Subject: Re: [RFC/PATCH 2/2] get_remote_merge_branch: Support for arbitrary  mapping
Date: Thu, 18 Jun 2009 11:27:31 +0200	[thread overview]
Message-ID: <adf1fd3d0906180227t4da5c0cby3b0e71b132eae68@mail.gmail.com> (raw)
In-Reply-To: <1245311834-5290-4-git-send-email-santi@agolina.net>

2009/6/18 Santi Béjar <santi@agolina.net>
>
> This function is used in "git pull --rebase" to know the tracking branch.
>
> Signed-off-by: Santi Béjar <santi@agolina.net>
> ---
>  git-parse-remote.sh |   21 ++++++++++++---------
>  1 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/git-parse-remote.sh b/git-parse-remote.sh
> index 5f47b18..1aa6ffe 100755
> --- a/git-parse-remote.sh
> +++ b/git-parse-remote.sh

[...]

> @@ -83,13 +81,18 @@ get_remote_merge_branch () {
>            esac
>            expr "z$ref" : 'z.*:' >/dev/null || ref="${ref}:"
>            remote=$(expr "z$ref" : 'z\([^:]*\):')
> -           case "$remote" in
> -           '' | HEAD ) remote=HEAD ;;
[...]
> +           while true ; do
> +               case "$remote" in
> +               '' | HEAD ) remote=;;

I forgot to say that I changed the HEAD behavior because the remote
HEAD and the local remote HEAD (origin/HEAD) can point to different
branches, as the local remote HEAD represents your preference for
which is the default remote branch.

Santi

  reply	other threads:[~2009-06-18  9:28 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
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 [this message]
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=adf1fd3d0906180227t4da5c0cby3b0e71b132eae68@mail.gmail.com \
    --to=santi@agolina.net \
    --cc=git@vger.kernel.org \
    /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).