Re: [PATCH 3/5] git-submodule: New subcommand 'summary' (3) - limit summary size
- From
Ping Yin <pkufranky@gmail.com>
- Date
- Jan 13, 2008, 06:38 UTC
- Message-ID
- <46dff0320801122238k3c2d93f3x4faf2e08f48c43fe@mail.gmail.com>
- In-Reply-To
- <7v4pdiua4k.fsf@gitster.siamese.dyndns.org>
On Jan 13, 2008 3:17 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> "Ping Yin" <pkufranky@gmail.com> writes:
>
> > On Jan 12, 2008 4:36 PM, Junio C Hamano <gitster@pobox.com> wrote:
> >> Ping Yin <pkufranky@gmail.com> writes:
> >>
> >> > @@ -265,6 +267,10 @@ set_name_rev () {
> >> > #
> >> > modules_summary()
> >> > {
> >> > + summary_limit=${summary_limit:-1000000}
> >>
> >> Why a million?
> > Because i think a million is big enough. I'd better define a constant
> > for unlimited number.
>
> I think that is a wrong approach to begin with. You are
> assuming that you will always limit and by using improbably
> large limit to pretend it is unlimited. Why not making the
> summary list generator truely capable of produce an unlimited
> list?
>I used a pseudo unlimited number just to make code shorter. After considering it again, i find that the code is still brief by using a real unlimited number. So i'll correct it.
> I also think using 100 or so as a sane default, allowing the > user to override to say "I do not want any limitation", is a > much better default. >
Reasonable
-- Ping Yin