Re: [RFC/PATCH 01/11] ref-filter: add "%(objectname:size=X)" option
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jul 29, 2015, 16:02 UTC
- Message-ID
- <CAOLa=ZSj-7Gr-QPC8bNJU9+FDkxmw-bhQhzUs91PSFJJQnZNtQ@mail.gmail.com>
- In-Reply-To
- <xmqqvbd4fe5w.fsf@gitster.dls.corp.google.com>
On Tue, Jul 28, 2015 at 9:49 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes: > >> From: Karthik Nayak <karthik.188@gmail.com> >> >> Add support for %(objectname:size=X) where X is a number. >> This will print the first X characters of an objectname. >> The minimum value for X is 5. Hence any value lesser than >> 5 will default to 5 characters. > > Where does this hardcoded 5 come from? > > I'd agree that we would want some minimum for sanity (not safety), > but I do not think we want random callers of find-unique-abbrev > arbitrarily imposing their own minimum, making different codepaths > behave inconsistently without a good reason. > > It seems that the minimum we use for sanity at the core level is > MINIMUM_ABBREV. Is there a reason why that value is inappropriate > for this codepath? >
I don't quite remember, This is definitely wrong. Thanks Will use MINIMUM_ABBREV.
-- Regards, Karthik Nayak