Re: [PATCH 6/6] sha1_name: implement @{push} shorthand

2015-03-31 Thread Junio C Hamano
Jeff King writes: >> > +static char *tracking_ref_for(struct remote *remote, const char *refname) >> > +{ >> > + char *ret; >> > + >> > + ret = apply_refspecs(remote->fetch, remote->fetch_refspec_nr, refname); >> > + if (!ret) >> > + die(_("@{push} has no local tracking branch for rem

Re: [PATCH 6/6] sha1_name: implement @{push} shorthand

2015-03-31 Thread Jeff King
On Tue, Mar 31, 2015 at 05:41:02PM -0400, Eric Sunshine wrote: > On Tue, Mar 31, 2015 at 1:38 PM, Jeff King wrote: > > Signed-off-by: Jeff King > > --- > > diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt > > index 0796118..5d9df25 100644 > > --- a/Documentation/revisions.t

Re: [PATCH 6/6] sha1_name: implement @{push} shorthand

2015-03-31 Thread Jeff King
On Tue, Mar 31, 2015 at 02:37:25PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt > > index 0796118..5d9df25 100644 > > --- a/Documentation/revisions.txt > > +++ b/Documentation/revisions.txt > > @@ -98,6 +98,31 @@ so

Re: [PATCH 6/6] sha1_name: implement @{push} shorthand

2015-03-31 Thread Eric Sunshine
On Tue, Mar 31, 2015 at 1:38 PM, Jeff King wrote: > Signed-off-by: Jeff King > --- > diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt > index 0796118..5d9df25 100644 > --- a/Documentation/revisions.txt > +++ b/Documentation/revisions.txt > @@ -98,6 +98,31 @@ some output proc

Re: [PATCH 6/6] sha1_name: implement @{push} shorthand

2015-03-31 Thread Junio C Hamano
Jeff King writes: > diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt > index 0796118..5d9df25 100644 > --- a/Documentation/revisions.txt > +++ b/Documentation/revisions.txt > @@ -98,6 +98,31 @@ some output processing may assume ref names in UTF-8. >`branch..merge`). A m

[PATCH 6/6] sha1_name: implement @{push} shorthand

2015-03-31 Thread Jeff King
In a triangular workflow, each branch may have two distinct points of interest: the @{upstream} that you normally pull from, and the destination that you normally push to. There isn't a shorthand for the latter, but it's useful to have. For instance, you may want to know which commits you haven't