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

2015-07-13 Thread Duy Nguyen
On Mon, Jul 13, 2015 at 2:56 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Jul 12, 2015 at 7:17 AM, Duy Nguyen pclo...@gmail.com 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

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

2015-07-13 Thread Karthik Nayak
On Mon, Jul 13, 2015 at 4:21 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Jul 13, 2015 at 2:56 AM, Karthik Nayak karthik@gmail.com wrote: On Sun, Jul 12, 2015 at 7:17 AM, Duy Nguyen pclo...@gmail.com wrote: I guess if you can have multiple arguments after ':' in an atom, then you have

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

2015-07-12 Thread Karthik Nayak
On Sun, Jul 12, 2015 at 7:17 AM, Duy Nguyen pclo...@gmail.com 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

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

2015-07-12 Thread Duy Nguyen
On Sun, Jul 12, 2015 at 8:47 AM, Duy Nguyen pclo...@gmail.com wrote: Another thing, the atom value is also used for sorting. When used for sorting, I think these padding spaces should not be generated or it may confuse the sort algorithm. Left alignment may be ok, right or center alignment (in

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

2015-07-11 Thread Karthik Nayak
On Fri, Jul 10, 2015 at 9:50 PM, Junio C Hamano gits...@pobox.com wrote: This may be enough to support the various existing formats that are offered by git branch and/or git tag, but I do not think if this is the right approach in the longer term, or if we are painting ourselves in a corner

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

2015-07-11 Thread Karthik Nayak
On Thu, Jul 9, 2015 at 6:28 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Karthik Nayak karthik@gmail.com writes: Add support for %(refname:shortalign=X) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X

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

2015-07-11 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Thu, Jul 9, 2015 at 6:28 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: I think this would deserve a test and documentation. Even though your motivation is for an internal implementation, some users may want to use the feature in 'git

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

2015-07-11 Thread Duy Nguyen
On Sat, Jul 11, 2015 at 7:05 PM, Karthik Nayak karthik@gmail.com wrote: On Fri, Jul 10, 2015 at 9:50 PM, Junio C Hamano gits...@pobox.com wrote: This may be enough to support the various existing formats that are offered by git branch and/or git tag, but I do not think if this is the

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

2015-07-10 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: Add support for %(refname:shortalign=X) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X characters. If X is less than the shortened refname size, the entire shortened refname

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

2015-07-09 Thread Karthik Nayak
Add support for %(refname:shortalign=X) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X characters. If X is less than the shortened refname size, the entire shortened refname is printed. Mentored-by: Christian Couder

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

2015-07-09 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: Add support for %(refname:shortalign=X) where X is a number. This will print a shortened refname aligned to the left followed by spaces for a total length of X characters. If X is less than the shortened refname size, the entire shortened refname