Re: [PATCH 0/2] [RFD] Using gitrevisions :/search style with other operators
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Dec 9, 2010, 01:28 UTC
- Message-ID
- <AANLkTimU6Bhx-2XsZ45_7BmT9fo9MpK8TJWB3zZ=j-i7@mail.gmail.com>
- In-Reply-To
- <201012082051.09730.jnareb@gmail.com>
On Thu, Dec 9, 2010 at 2:51 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 25 quoted lines
> Dnia środa 8. grudnia 2010 19:06, Jonathan Nieder napisał:
>> Nguyễn Thái Ngọc Duy wrote:
>>
>> > Let's start off from where the previous discussion [1] stopped. People
>> > seem to agree ref^{/regex} is a good choice. But we have not come to
>> > conclusion how to specify the count yet. Possible suggestions are
>> >
>> > - ref^{/foo}2
>> > - ref^{2/foo}
>> > - ref^{:2/foo}
>> > - ref^{2nd/foo}
>>
>> How about
>>
>> ref^{/foo}^^{/foo}
>>
>> ?
>
> I'll assume that there is invisible ";)" emoticon here.
>
>
> First, it would be ref^{/foo}^@^{/foo}, otherwise you would follow only
> first parent.
>
> Second, consider ref^{:nth(10)/foo} in your workaround...Maybe we should generalize this to apply to all operators. Currently foo~3 is expanded to foo^^^. How about ~~X (or xN) denote repeat the last operator N times? For example, HEAD^2x3 => HEAD^2^2^2, HEAD^{/foo}x3 => HEAD^{/foo}^{/foo}^{/foo}.
-- Duy