From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0C57C001B0 for ; Thu, 10 Aug 2023 17:15:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234549AbjHJRPe (ORCPT ); Thu, 10 Aug 2023 13:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233590AbjHJRPc (ORCPT ); Thu, 10 Aug 2023 13:15:32 -0400 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1226126B2 for ; Thu, 10 Aug 2023 10:15:32 -0700 (PDT) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 6F7EF19AB1B; Thu, 10 Aug 2023 13:15:31 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=1kpzJf90oE/tZMFFCre1XAsVUQluTskcdyg/FB NQBeo=; b=SzA+9LhPyjC10xWo6x+YRu7rCx5lNbpkWbAKKu4eDz9SI5O1tjLVTM yI/TxJYQnfpgMvIcxWswkCIYS4aah2L72AM+l/cljsUeYkPq6BcZ9Odg3zH/1kat UrEsB1oe8ytKwXyen1h+nefhfpjKgJ2XRM7BaXBP1OG13enkuKdnQ= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 67CEE19AB1A; Thu, 10 Aug 2023 13:15:31 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.58.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id D0B8219AB18; Thu, 10 Aug 2023 13:15:30 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, Mark Ruvald Pedersen , Johannes Schindelin Subject: Re: [PATCH 2/2] rebase: allow overriding the maximal length of the generated labels References: Date: Thu, 10 Aug 2023 10:15:29 -0700 In-Reply-To: (Johannes Schindelin via GitGitGadget's message of "Thu, 10 Aug 2023 16:35:00 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 8232A46A-37A1-11EE-866E-C65BE52EC81B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > With this change, users can override the compiled-in default for the > maximal length of the label names generated by `git rebase > --rebase-merges`. > ... > +rebase.maxLabelLength:: > + When generating label names from commit subjects, truncate the names to > + this length. By default, the names are truncated to a little less than > + `NAME_MAX` (to allow e.g. `.lock` files to be written for the > + corresponding loose refs). OK. > @@ -5512,6 +5514,8 @@ static int make_script_with_merges(struct pretty_print_context *pp, > *cmd_reset = abbr ? "t" : "reset", > *cmd_merge = abbr ? "m" : "merge"; > > + git_config_get_int("rebase.maxlabellength", &state.max_label_length); > + And it makes sense that the code does not do any check against the NAME_MAX; presumably the primary mission of this configuration variable is to help users who know better than their system headers, and they may need to bust the NAME_MAX limit that is artificially set too low. Will queue. Thanks.