From patchwork Thu Nov 5 20:15:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hukeping X-Patchwork-Id: 11884271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38CBBC00A89 for ; Thu, 5 Nov 2020 12:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D50B620719 for ; Thu, 5 Nov 2020 12:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730184AbgKEMQZ (ORCPT ); Thu, 5 Nov 2020 07:16:25 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6745 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgKEMQZ (ORCPT ); Thu, 5 Nov 2020 07:16:25 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CRjDF4VWfzkXgl; Thu, 5 Nov 2020 20:16:13 +0800 (CST) Received: from workwork.huawei.com (10.108.148.37) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Thu, 5 Nov 2020 20:16:11 +0800 From: Hu Keping To: CC: , , , , , Subject: [PATCH] Lengthening FORMAT_PATCH_NAME_MAX to 80 Date: Thu, 5 Nov 2020 20:15:48 +0000 Message-ID: <20201105201548.2333425-1-hukeping@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 MIME-Version: 1.0 X-Originating-IP: [10.108.148.37] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The file name of the patch generated by `git format-patch` usually be truncated as there is less than 60 bytes left for the subject of commit message exclude the prefix patch number, say "0001-". As per the kernel documentation[1], it suggest the length of subject no more than 75. > > [...] > For these reasons, the ``summary`` must be no more than 70-75 > characters, and it must describe both what the patch changes, as well > as why the patch might be necessary. > Considered the prefix patch number "0001-" would take 5 characters, increase the FORMAT_PATCH_NAME_MAX to 80. [1] https://www.kernel.org/doc/Documentation/process/submitting-patches.rst Signed-off-by: Hu Keping --- log-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log-tree.h b/log-tree.h index 8fa79289ec..021aee0d21 100644 --- a/log-tree.h +++ b/log-tree.h @@ -33,7 +33,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit, int maybe_multipart); void load_ref_decorations(struct decoration_filter *filter, int flags); -#define FORMAT_PATCH_NAME_MAX 64 +#define FORMAT_PATCH_NAME_MAX 80 void fmt_output_commit(struct strbuf *, struct commit *, struct rev_info *); void fmt_output_subject(struct strbuf *, const char *subject, struct rev_info *); void fmt_output_email_subject(struct strbuf *, struct rev_info *);