git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Lengthening FORMAT_PATCH_NAME_MAX to 80
@ 2020-11-05 20:15 Hu Keping
  2020-11-05 15:01 ` Jeff King
  0 siblings, 1 reply; 15+ messages in thread
From: Hu Keping @ 2020-11-05 20:15 UTC (permalink / raw)
  To: git; +Cc: zhengjunling, zhuangbiaowei, git, rafa.almas, l.s.r, gitster

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 <hukeping@huawei.com>
---
 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 *);
-- 
2.18.0.huawei.25


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-11-10  5:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-05 20:15 [PATCH] Lengthening FORMAT_PATCH_NAME_MAX to 80 Hu Keping
2020-11-05 15:01 ` Jeff King
2020-11-05 21:16   ` Junio C Hamano
2020-11-06  8:51     ` hukeping
2020-11-06 17:45       ` Junio C Hamano
2020-11-06 20:50     ` Junio C Hamano
2020-11-06 21:56       ` [PATCH] format-patch: make output filename configurable Junio C Hamano
2020-11-06 22:05         ` Eric Sunshine
2020-11-09 19:23           ` [PATCH v2] " Junio C Hamano
2020-11-10  0:23             ` Jeff King
2020-11-10  1:43               ` Junio C Hamano
2020-11-10  2:31             ` hukeping
2020-11-10  2:37               ` Junio C Hamano
2020-11-10  4:44                 ` hukeping
2020-11-10  5:40                   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).