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 artag...@gmail.com wrote: Try this now: configure your current branch's pushremote to push to refs/heads/*:refs/heads/rr/*. Now, type 'git show

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 artag...@gmail.com 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

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 artag...@gmail.com wrote: Duy Nguyen wrote: On Thu, May 23, 2013 at 10:12 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Try this now: configure your current branch's pushremote to push to refs/heads/*:refs/heads/rr/*. Now, type 'git

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 @{u}.

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

2013-05-24 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com 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

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 mechanism to expand

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

2013-05-24 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com 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

[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.name.push is explicitly specified. 2. There is a pattern to match (*). Proof-of-concept only. Signed-off-by: Ramkumar