Re: [PATCH v10 05/13] ref-filter: implement an `align` atom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Karthik Nayak <karthik.188@xxxxxxxxx> writes:

> On Thu, Aug 13, 2015 at 1:54 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
>> I think the most generic way to think about this is to consider that
>> the most fully spelled form of align would be this:
>>
>>         %(align:width=12,position=left)
>>
>> And another rule you would have is that the user is allowed to omit
>> "<attr>=" when it is obvious from its value.  For "align", 'left'
>> can only possibly be the value for 'position' and similarly '12' for
>> 'width'.  That is why the "objectname" example says "abbrev=8", and
>> not "abbrev,8", because from the value of "8" without the attribute
>> name, you cannot tell if the user meant abbrev=8 or magic=8.
>>
>> That '"<attr>=" can be omitted' rule makes both of these valid
>> constructs:
>>
>>         %(align:12,left) %(align:left,12)
>>
>
> Are you sure you want it to be so flexible?

Eventually, yes.

But that does not mean you must do it by next week, and that is why
I said "way to think about is to consider", not "way to design this
is to implement".

In the worst case, if the only-allowed form the end-users can give
were limited to "align:12,left" and "align:12" and "align:left,12"
failed in the version you complete by the end of GSoC, it is still
OK to ship it in 2.7, with a "known bugs" section for somebody
(maybe you) to further polish in the future.  As long as we leave
the door open for such an enhancement that would not make what used
to be valid invalid and only would allow what used to be invalid
valid, we would be fine---we can make progress without harming
existing users.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]