Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-04 Thread David Aguilar
On Thu, May 2, 2013 at 10:09 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: We probably should fix those, but that is orthogonal to the '@' shortcut. We can have the '@' shortcut *today*, with minimal changes to the code and the documentation, in a limited and

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-04 Thread David Aguilar
On Sat, May 4, 2013 at 1:10 AM, David Aguilar dav...@gmail.com wrote: On Thu, May 2, 2013 at 10:09 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: We probably should fix those, but that is orthogonal to the '@' shortcut. We can have the '@' shortcut *today*, with

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Ramkumar Ramachandra
Felipe Contreras wrote: [...] Yes, I'm working on a re-roll. Moreover, the symbolic-ref 'HEAD' is quite special, it's mentioned everywhere in the documentation, and the code has special cases for it. It's not reasonable to expect all relevant places to be updated for this functionality, and

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Felipe Contreras
On Thu, May 2, 2013 at 4:07 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: [...] Yes, I'm working on a re-roll. Moreover, the symbolic-ref 'HEAD' is quite special, it's mentioned everywhere in the documentation, and the code has special cases for it. It's not

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Ramkumar Ramachandra
Felipe Contreras wrote: But HEAD is special, @ is not. HEAD is documented, @ is not. Your point being? That we should document @? Yes, I agree. Where is it documented that @ points to HEAD? Where is it documented that 'branch -u foo @' would replace @ with HEAD?

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote: [...] Disclaimer: I'm not saying that my implementation is Correct and Final. I will be more thorough in my re-roll about justifying my changes. What I am saying is that we should fix symbolic refs, and that @ should be implemented at the ref-level to maximize

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Felipe Contreras
On Thu, May 2, 2013 at 6:03 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: But HEAD is special, @ is not. HEAD is documented, @ is not. Your point being? That we should document @? Yes, I agree. Where? Where is it documented that @ points to HEAD? Where is it

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Ramkumar Ramachandra
Felipe Contreras wrote: Your approach can NOT be documented. Ah, I missed that. The explanation I was looking for is: HEAD has been special right from the start, and we cannot elevate anything else to its status now. Thanks. And sorry it took me so long. -- To unsubscribe from this list:

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Felipe Contreras
On Thu, May 2, 2013 at 11:56 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Felipe Contreras wrote: Your approach can NOT be documented. Ah, I missed that. The explanation I was looking for is: HEAD has been special right from the start, and we cannot elevate anything else to its

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote: HEAD has been special right from the start, and we cannot elevate anything else to its status now. As to why I agree with you: I audited the callers of branch_get() and found out there are some things that cannot be fixed just by fixing branch_get(): For instance,

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Felipe Contreras
On Thu, May 2, 2013 at 12:02 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Ramkumar Ramachandra wrote: HEAD has been special right from the start, and we cannot elevate anything else to its status now. As to why I agree with you: I audited the callers of branch_get() and found out there

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-02 Thread Ramkumar Ramachandra
Felipe Contreras wrote: We probably should fix those, but that is orthogonal to the '@' shortcut. We can have the '@' shortcut *today*, with minimal changes to the code and the documentation, in a limited and understood scope, with no surprises. We can fix the symbolic ref stuff slowly,

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-01 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: To emphasize what we're testing in @{1}@{u}, document that @{0}@{0} is also nonsense. This makes it clear that @{n} does not resolve to a ref whose upstream we can determine with @{u}/ reflog we can dig with @{0}. Since HEAD is implicit in

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-01 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Just making sure. HEAD@{$n} and @{$n} for non-negative $n mean totally different things. @{0} and HEAD@{0} are almost always the same, and @{1} and HEAD@{1} may often happen to be the same, but as a blanket statement, I find Since HEAD is implicit in @{} very

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-01 Thread Jeff King
On Thu, May 02, 2013 at 02:34:01AM +0530, Ramkumar Ramachandra wrote: Junio C Hamano wrote: Just making sure. HEAD@{$n} and @{$n} for non-negative $n mean totally different things. @{0} and HEAD@{0} are almost always the same, and @{1} and HEAD@{1} may often happen to be the same, but as

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-01 Thread Ramkumar Ramachandra
Jeff King wrote: The difference is that HEAD@{} refers to HEAD's reflog, but @{} refers to the reflog of the branch pointed to by HEAD. Ah, I missed this. Thanks for the testcase. My patch changes this behavior, and I'm looking into the problem. -- To unsubscribe from this list: send the line

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, May 02, 2013 at 02:34:01AM +0530, Ramkumar Ramachandra wrote: Junio C Hamano wrote: Just making sure. HEAD@{$n} and @{$n} for non-negative $n mean totally different things. @{0} and HEAD@{0} are almost always the same, and @{1} and HEAD@{1} may

Re: [PATCH 1/5] t1508 (at-combinations): more tests; document failures

2013-05-01 Thread Felipe Contreras
On Wed, May 1, 2013 at 1:53 PM, Junio C Hamano gits...@pobox.com wrote: As you and Felipe seem to be aiming for the same Let's allow users to say '@' when they mean HEAD, I'll let you two figure the best approach out. One productive way forward might be to come up with a common test script