Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-28 Thread Karthik Nayak
On Sun, Jun 28, 2015 at 1:09 PM, Junio C Hamano gits...@pobox.com wrote: Karthik Nayak karthik@gmail.com writes: Add support for %(refname:lalignX) 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

Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-28 Thread Karthik Nayak
Hey Christian, On Sun, Jun 28, 2015 at 1:32 AM, Christian Couder christian.cou...@gmail.com wrote: After thinking about such code, I wonder if it would be better to support %(refname:lalign=X) instead of %(refname:lalignX). The reason why it might be interesting to require an = sign between

Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-28 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: Add support for %(refname:lalignX) 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

Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-28 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com writes: On Sun, Jun 28, 2015 at 1:09 PM, Junio C Hamano gits...@pobox.com wrote: Why would we even want this kind of thing in the first place? Is this to make it possible to re-implement some option that exists already in 'git branch' or 'git tag' as a

Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-27 Thread Christian Couder
On Thu, Jun 25, 2015 at 1:43 PM, Karthik Nayak karthik@gmail.com wrote: Add support for %(refname:lalignX) 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

Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-27 Thread Duy Nguyen
On Thu, Jun 25, 2015 at 6:43 PM, Karthik Nayak karthik@gmail.com wrote: Add support for %(refname:lalignX) 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

Re: [RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-27 Thread Christian Couder
On Sat, Jun 27, 2015 at 10:02 PM, Christian Couder christian.cou...@gmail.com wrote: On Thu, Jun 25, 2015 at 1:43 PM, Karthik Nayak karthik@gmail.com wrote: + if (starts_with(formatp, lalign)) { + const char *valp; +

[RFC/PATCH 1/9] ref-filter: add %(refname:lalignX) option

2015-06-25 Thread Karthik Nayak
Add support for %(refname:lalignX) 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