git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Pat Notz <patnotz@gmail.com>
Cc: Ramana Kumar <ramana.kumar@gmail.com>, git@vger.kernel.org
Subject: Re: get-upstream
Date: Thu, 23 Sep 2010 01:36:00 -0400	[thread overview]
Message-ID: <20100923053600.GA27540@sigill.intra.peff.net> (raw)
In-Reply-To: <AANLkTikYnj_00Pdsm+QM1=kvqMpeKDCeOOqOS0XEwMXg@mail.gmail.com>

On Wed, Sep 22, 2010 at 10:15:00PM -0600, Pat Notz wrote:

> On Wed, Sep 22, 2010 at 10:05 PM, Pat Notz <patnotz@gmail.com> wrote:
> > $ git rev-parse --symbolic-full-name @{upstream}
> 
> In all fairness, the @{upstream} syntax requires git >= 1.7.0

You can also use:

  git for-each-ref --format='%(upstream)' `git symbolic-ref HEAD`

which has worked since v1.6.3. It also has the advantage that you can
ask for the upstream of something besides the HEAD.

-Peff

      parent reply	other threads:[~2010-09-23  5:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23  3:46 get-upstream Ramana Kumar
2010-09-23  4:05 ` get-upstream Pat Notz
2010-09-23  4:15   ` get-upstream Pat Notz
2010-09-23  4:16     ` get-upstream Ramana Kumar
2010-09-23  5:37       ` get-upstream Jeff King
2010-09-23 14:28         ` get-upstream Pat Notz
2010-09-23  5:36     ` Jeff King [this message]

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=20100923053600.GA27540@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=patnotz@gmail.com \
    --cc=ramana.kumar@gmail.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).