Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-29 Thread Karthik Nayak
On Wed, Jul 29, 2015 at 3:11 AM, Eric Sunshine wrote: > On Mon, Jul 27, 2015 at 3:27 AM, Karthik Nayak wrote: >> Add a new atom "padright" and support %(padright:X) where X is a >> number. This will align the succeeding atom value to the left >> followed by spaces for a total length of X charact

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-28 Thread Eric Sunshine
On Mon, Jul 27, 2015 at 3:27 AM, Karthik Nayak wrote: > Add a new atom "padright" and support %(padright:X) where X is a > number. This will align the succeeding atom value to the left > followed by spaces for a total length of X characters. If X is less > than the item size, the entire atom valu

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Junio C Hamano
Matthieu Moy writes: > Yes, but on the other hand we already have: > > git log --format='%<|(50)A very long irrevlevancy|%an|' > > that pads/truncate %an. So, consistancy would dictate that Karthik's > version is the right one. Interesting. Although that %<(50) looks simply a bug to me which

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Karthik Nayak
On Tue, Jul 28, 2015 at 12:17 AM, Matthieu Moy wrote: > Karthik Nayak writes: > >> On Mon, Jul 27, 2015 at 9:24 PM, Matthieu Moy >> wrote: >>> Yes, but on the other hand we already have: >>> >>> git log --format='%<|(50)A very long irrevlevancy|%an|' >>> >>> that pads/truncate %an. So, consist

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Jul 27, 2015 at 9:24 PM, Matthieu Moy > wrote: >> Yes, but on the other hand we already have: >> >> git log --format='%<|(50)A very long irrevlevancy|%an|' >> >> that pads/truncate %an. So, consistancy would dictate that Karthik's >> version is the right one. >

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Karthik Nayak
On Mon, Jul 27, 2015 at 6:20 PM, Matthieu Moy wrote: > u > also need to check that it is taken into account for the right atom and > only this one. I'd suggest > > --format '%(refname)%(padright:25)|%(refname)|%(refname)|' I guess this is more accurate, Thanks. -- Regards, Karthik Nayak -- To u

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Karthik Nayak
On Mon, Jul 27, 2015 at 9:24 PM, Matthieu Moy wrote: > Junio C Hamano writes: > >> Matthieu Moy writes: >> >>> See my remark on previous patch: this test is not sufficient. You do >>> not only need to check that %(padright) is taken into account, but you >>> also need to check that it is taken i

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> See my remark on previous patch: this test is not sufficient. You do >> not only need to check that %(padright) is taken into account, but you >> also need to check that it is taken into account for the right atom and >> only this one. I'd sugge

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Junio C Hamano
Matthieu Moy writes: > See my remark on previous patch: this test is not sufficient. You do > not only need to check that %(padright) is taken into account, but you > also need to check that it is taken into account for the right atom and > only this one. I'd suggest > > --format '%(refname)%(pad

Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Matthieu Moy
Karthik Nayak writes: > --- a/t/t6302-for-each-ref-filter.sh > +++ b/t/t6302-for-each-ref-filter.sh > @@ -81,4 +81,20 @@ test_expect_success 'filtering with --contains' ' > test_cmp expect actual > ' > > +test_expect_success 'padding to the right using `padright`' ' > + cat >expect <

[PATCH v5 03/11] ref-filter: add option to pad atoms to the right

2015-07-27 Thread Karthik Nayak
Add a new atom "padright" and support %(padright:X) where X is a number. This will align the succeeding atom value to the left followed by spaces for a total length of X characters. If X is less than the item size, the entire atom value is printed. Add tests and documentation for the same. Helpe