Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Junio C Hamano wrote: rev-parse (with an option, maybe) may be a better place for this. >>> >>> Er, no. I actually want things like diff @{p}..HEAD. I want it to be >>> a first-class revision, just like @{u}. >> >> I think Duy's suggestion makes perfect

Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Ramkumar Ramachandra
Junio C Hamano wrote: >>> rev-parse (with an option, maybe) may be a better place for >>> this. >> >> Er, no. I actually want things like diff @{p}..HEAD. I want it to be >> a first-class revision, just like @{u}. > > I think Duy's suggestion makes perfect sense; rev-parse already has > a mechani

Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Duy Nguyen wrote: >> Then "show @{p}" should show the tip commit of rr/master, not the ref >> name. > > Yes, that is correct. > >> rev-parse (with an option, maybe) may be a better place for >> this. > > Er, no. I actually want things like diff @{p}..HEAD. I want

Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Ramkumar Ramachandra
Duy Nguyen wrote: > Then "show @{p}" should show the tip commit of rr/master, not the ref > name. Yes, that is correct. > rev-parse (with an option, maybe) may be a better place for > this. Er, no. I actually want things like diff @{p}..HEAD. I want it to be a first-class revision, just like @

Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Duy Nguyen
On Fri, May 24, 2013 at 11:15 PM, Ramkumar Ramachandra wrote: > Duy Nguyen wrote: >> On Thu, May 23, 2013 at 10:12 PM, Ramkumar Ramachandra >> wrote: >>> Try this now: configure your current branch's pushremote to push to >>> "refs/heads/*:refs/heads/rr/*". Now, type 'git show @{p}'. Voila! >>

Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Ramkumar Ramachandra
Duy Nguyen wrote: > On Thu, May 23, 2013 at 10:12 PM, Ramkumar Ramachandra > wrote: >> Try this now: configure your current branch's pushremote to push to >> "refs/heads/*:refs/heads/rr/*". Now, type 'git show @{p}'. Voila! > > Voila what? Why not avoid guessing game and describe what the patch

Re: [PATCH 7/7] sha1_name: implement finding @{push}

2013-05-24 Thread Duy Nguyen
(I haven't caught up with git mails lately, but the @{special} refactoring caught my eyes..) On Thu, May 23, 2013 at 10:12 PM, Ramkumar Ramachandra wrote: > Try this now: configure your current branch's pushremote to push to > "refs/heads/*:refs/heads/rr/*". Now, type 'git show @{p}'. Voila! V

[PATCH 7/7] sha1_name: implement finding @{push}

2013-05-23 Thread Ramkumar Ramachandra
Try this now: configure your current branch's pushremote to push to "refs/heads/*:refs/heads/rr/*". Now, type 'git show @{p}'. Voila! It currently only works when: 1. remote..push is explicitly specified. 2. There is a pattern to match (*). Proof-of-concept only. Signed-off-by: Ramkumar Ramac