Re: [PATCH v2 01/10] ref-filter: add %(refname:shortalign=X) option

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

 



On Mon, Jul 13, 2015 at 4:21 PM, Duy Nguyen <pclouds@xxxxxxxxx> wrote:
> On Mon, Jul 13, 2015 at 2:56 AM, Karthik Nayak <karthik.188@xxxxxxxxx> wrote:
>> On Sun, Jul 12, 2015 at 7:17 AM, Duy Nguyen <pclouds@xxxxxxxxx> wrote:
>>>
>>> I guess if you can have multiple arguments after ':' in an atom, then
>>> you have wiggle room for future. But it looks like you only accept one
>>> argument after ':'.. (I only checked the version on 'pu'). Having an
>>> "alignment atom" to augment the real one (like %< changes the behavior
>>> of the next placeholder), could also work, but it adds dependency
>>> between atoms, something I don't think ref-filter.c is ready for.
>>>
>>
>> I was thinking of something on the lines of having a function which right
>> before printing checks if any "align" option is given to the end of a given
>> item and aligns it accordingly, this ensures that any item which needs to
>> have such an option can easily do so.
>>
>> https://github.com/KarthikNayak/git/commit/0284320483d6442a6425fc665e740f9f975654a1
>>
>> This is what I came up with, you could have a look and let me know if
>> you have any
>> suggestions.
>
> Yeah, pretty close to what I described in the other mail. Now if you
> make "align" a separate atom, I think it would reduce clutter in
> populate_value() (my personal opinion is this function looks too messy
> already) and we can easily add more alignment options in future :)
> --
> Duy

Yeah, that seems like the way to go, eventually :)

-- 
Regards,
Karthik Nayak
--
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]