[PATCH] Lengthening FORMAT_PATCH_NAME_MAX to 80

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux