git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] docs: correct trailer `key_value_separator` description

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 18, 2024, 16:02 UTC
Message-ID
<xmqqh6h3jzp1.fsf@gitster.g>
In-Reply-To
<owlyv85k2gts.fsf@fine.c.googlers.com>
Linus Arver <linusa@google.com> writes:
> WRT line lengths, probably 80-ish columns is the (unwritten?) rule. The

Your patches will be reviewed on the mailing list. If you keep your line length to somewhere around ~70, the line will still fit within the 80-ish terminal width after a few rounds of review exchanges, with ">> " prefixed. That reasoning is mostly about the proposed commit log messages, but the same would apply to things like AsciiDoc sources.

It is true that we do not write it down. Perhaps something like this is in order?

diff --git i/Documentation/SubmittingPatches w/Documentation/SubmittingPatches
index e734a3f0f1..68e9ad71a1 100644
--- i/Documentation/SubmittingPatches
+++ w/Documentation/SubmittingPatches
@@ -280,6 +280,14 @@ or, on an older version of Git without support for --pretty=reference:
 	git show -s --date=short --pretty='format:%h (%s, %ad)' <commit>
 ....
 
+[[line-wrap]]
+
+Just like we limit the patch subject to 50 chars or so, the lines in
+the proposed log message should be around 70 chars to make sure that
+it still can be shown on 80-column terminal without line wrapping
+after a handful of review exchanges add "> " prefix to them.
+
+
 [[sign-off]]
 === Certify your work by adding your `Signed-off-by` trailer
 

> text files aren't really meant for end-user consumption (that's what the
> manpage and HTML formats are for), so I think it's OK if the line
> lengths are roughly in the same ballpark (no need to worry too much
> about exact lengths).

Yes, too.  And it is one way to reduce patch noise and nicer to
reviewers, when used moderately (i.e. removing a word and making a
line to occupy only 50 columns when ajacent ones are 70 columns may
still be better than reflowing.  Leaving only a single word on such
a line may not be reasonable and tucking the word after or before
one of these ajacent 70-column lines would work better in such a
case).

Thanks.
Previous: Linus ArverNext: Kristoffer Haugsbakk
Message 5 of 12 in “docs: correct trailer `key_value_separator` description”
  1. docs: correct trailer `key_value_separator` descriptionBrian Lyles, Mar 16, 2024
  2. Linus ArverMar 16, 2024
  3. Brian LylesMar 18, 2024
  4. Linus ArverMar 18, 2024
  5. Junio C HamanoMar 18, 2024
  6. Kristoffer HaugsbakkMar 18, 2024
  7. Junio C HamanoMar 18, 2024
  8. Linus ArverMar 19, 2024
  9. 1/2 docs: correct trailer `key_value_separator` descriptionBrian Lyles, Mar 18, 2024
  10. Junio C HamanoMar 18, 2024
  11. 2/2 docs: adjust trailer `separator` and `key_value_separator` languageBrian Lyles, Mar 18, 2024
  12. Linus ArverMar 18, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.