Re: [PATCH v5 03/11] ref-filter: add option to pad atoms to the right
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jul 27, 2015, 18:54 UTC
- Message-ID
- <CAOLa=ZT9_0ZZQwKwObgndLezcOWOk3LBTjAM7mMU2cyXu7--MQ@mail.gmail.com>
- In-Reply-To
- <vpqwpxl30aj.fsf@anie.imag.fr>
On Tue, Jul 28, 2015 at 12:17 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 25 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes: > >> On Mon, Jul 27, 2015 at 9:24 PM, Matthieu Moy >> <Matthieu.Moy@grenoble-inp.fr> 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. >> >> Sorry but I didn't understand what you're trying to say here, Matthieu. > > The "git log" equivalent of %(padright:N) is %<|(N), and it behaves the > same way as your current implementation of %(padright) (except for the > missing reset in your v5). > > So, if we want to be consistant with "git log", we should keep the > "apply to next atom, even if it's far away in the format string" > semantics. > > Note that consistancy is not the only criterion for choice, so I'm not > saying we should absolutely do this, just that there's an argument in > favor of it. >
I didn't know that, thanks, I think I'll let Junio make the call here :)
-- Regards, Karthik Nayak