From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 432B11F66F for ; Fri, 6 Nov 2020 22:06:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728765AbgKFWGO (ORCPT ); Fri, 6 Nov 2020 17:06:14 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45916 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728365AbgKFWGN (ORCPT ); Fri, 6 Nov 2020 17:06:13 -0500 Received: by mail-ed1-f68.google.com with SMTP id q3so2769215edr.12 for ; Fri, 06 Nov 2020 14:06:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8m8dAajY/srXFeWDMAXfcGJdE2jE3yVbe5XK0R3kKNA=; b=gPqCh78BpQckJ2dolPGQR5aeDbtVTXjhnp7uulZYOqWag8TiLVBQCLoEufz2ftZbcp N2epeds9BaAg0A/nxW9m4Qdt4rDv6kthGBZASjKkE+iapuzyKAlMq76SZVh22BQfysxv ep/ivmj+siLprKRbaWz+3rUDHJ/kn2XGfxPfHBxNdBp7/1KMiK6XF+m5Ml5D1m8LNOJA KhK4ka2m5makN7CmJ5mbWTMnhOfrajuMt8EOI+bckg4292ZZ7GobbkpqCzKMDtYQKHAi Ia24G5JDEUphrxCgKajXcSSK8+WYMkp72BpfDPieZWB3rd2bTsvM26GtFcuXP/7yO7N2 bWYw== X-Gm-Message-State: AOAM5331iTeEwc9G/S0O1bKZbzWHEc08tmy4WRrmGX0hm58SBQ58XDpq W9J6DZV9oc34aoT4pYn0NkOJTwYClCrA54EOpxw= X-Google-Smtp-Source: ABdhPJzyRAUnAsWoTtuNQrk5mCX+cOV7+sAgyji+DzvOsi/uKtT+x23Ml5pe0MONFASOcr/ro38O+4eSNbgVxs34j1A= X-Received: by 2002:a50:c40c:: with SMTP id v12mr4300357edf.233.1604700370611; Fri, 06 Nov 2020 14:06:10 -0800 (PST) MIME-Version: 1.0 References: <20201105201548.2333425-1-hukeping@huawei.com> <20201105150149.GA107127@coredump.intra.peff.net> In-Reply-To: From: Eric Sunshine Date: Fri, 6 Nov 2020 17:05:59 -0500 Message-ID: Subject: Re: [PATCH] format-patch: make output filename configurable To: Junio C Hamano Cc: Git List , Hu Keping , zhengjunling@huawei.com, zhuangbiaowei@huawei.com, Patrick Hemmer , Rafael Ascensao , =?UTF-8?Q?Ren=C3=A9_Scharfe?= , Jeff King Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Nov 6, 2020 at 4:56 PM Junio C Hamano wrote: > [...] > Introduce a new command line option --filename-max-length= and a > new configuration variable format.filenameMaxLength to override the > hardcoded default. > [...] > Signed-off-by: Junio C Hamano > --- > diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt > @@ -200,6 +201,13 @@ populated with placeholder text. > +--filename-max-length=:: > + Instead of the standard 64 bytes, chomp the generated output > + filenames at around '' bytes (too short a value will be > + silently raised to a reasonable length). Defaults to the > + value of the `format.filenamemaxlength` configuration > + variable, or 64 if unconfigured. In user-facing documentation, I believe practice is to camelCase the configuration variable name, so: s/filenamemaxlength/filenameMaxLength/ This new configuration also ought to be mentioned in Documentation/config/format.txt. > diff --git a/builtin/log.c b/builtin/log.c > @@ -37,6 +37,7 @@ > +#define FORMAT_PATCH_NAME_MAX 64 Nit: A slightly less confusing name would be FORMAT_PATCH_NAME_MAX_DEFAULT.