From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH 3/5] git-submodule: New subcommand 'summary' (3) - limit summary size Date: Sat, 12 Jan 2008 11:17:15 -0800 Message-ID: <7v4pdiua4k.fsf@gitster.siamese.dyndns.org> References: <1200123435-16722-1-git-send-email-pkufranky@gmail.com> <62a73e734832ad67e89be706f1f8b3dbc30cfcf4.1200122041.git.pkufranky@gmail.com> <7vabnbv3sb.fsf@gitster.siamese.dyndns.org> <46dff0320801120151s7959edddp1e1f8b506da79e4e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Junio C Hamano" , git@vger.kernel.org To: "Ping Yin" X-From: git-owner@vger.kernel.org Sat Jan 12 20:17:57 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JDlrf-0001Vj-TT for gcvg-git-2@gmane.org; Sat, 12 Jan 2008 20:17:56 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753978AbYALTR2 (ORCPT ); Sat, 12 Jan 2008 14:17:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751191AbYALTR2 (ORCPT ); Sat, 12 Jan 2008 14:17:28 -0500 Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:37606 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751645AbYALTR1 (ORCPT ); Sat, 12 Jan 2008 14:17:27 -0500 Received: from a-sasl-quonix (localhost [127.0.0.1]) by a-sasl-quonix.pobox.com (Postfix) with ESMTP id E7A5A5429; Sat, 12 Jan 2008 14:17:25 -0500 (EST) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.pobox.com (Postfix) with ESMTP id 59CE55426; Sat, 12 Jan 2008 14:17:22 -0500 (EST) In-Reply-To: <46dff0320801120151s7959edddp1e1f8b506da79e4e@mail.gmail.com> (Ping Yin's message of "Sat, 12 Jan 2008 17:51:43 +0800") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: "Ping Yin" writes: > On Jan 12, 2008 4:36 PM, Junio C Hamano wrote: >> Ping Yin 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 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.