git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Kristoffer Haugsbakk" <code@khaugsbakk.name>
Cc: brianmlyles <brianmlyles@gmail.com>,
	 git@vger.kernel.org,  "Linus Arver" <linusa@google.com>
Subject: Re: [PATCH] docs: correct trailer `key_value_separator` description
Date: Mon, 18 Mar 2024 12:13:43 -0700	[thread overview]
Message-ID: <xmqq5xxjgxp4.fsf@gitster.g> (raw)
In-Reply-To: <f6a16989-cbcb-4558-ae3b-350437fda7c2@app.fastmail.com> (Kristoffer Haugsbakk's message of "Mon, 18 Mar 2024 19:15:57 +0100")

"Kristoffer Haugsbakk" <code@khaugsbakk.name> writes:

> My interpretation of this is
>
> 1. Commit messages are flowed/reflowed to 72 columns
> 2. Code is reflowed to 80 columns (enforced by tools like clang-format)
>    • See `.clang-format` and `.editorconfig` (kept in synch.)
> 3. Source documentation (AsciiDoc) is reflowed to 72 opportunistically;
>    not every time (in order to avoid diff noise) but when it feels like it
>    makes sense
>
> Maybe SubmittingPatches should mention that last point? If my
> interpretation is correct.

I do not know about #2.  I've seen cases where a patch trying to
stick to the hard 80-column limit is hurting readability a lot.  I
think the moral of the story is that code should never be reflowed
mechanically without thinking---rather developers, when they see the
need to go way too deep in indentation levels, should learn to take
it a sign that they need to first refactor their code, e.g. with
smaller helper functions with meaningful names.



  reply	other threads:[~2024-03-18 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-16  3:55 [PATCH] docs: correct trailer `key_value_separator` description Brian Lyles
2024-03-16  6:53 ` Linus Arver
2024-03-18  4:49   ` Brian Lyles
2024-03-18  6:29     ` Linus Arver
2024-03-18 16:02       ` Junio C Hamano
2024-03-18 18:15         ` Kristoffer Haugsbakk
2024-03-18 19:13           ` Junio C Hamano [this message]
2024-03-19  7:21         ` Linus Arver
2024-03-18  5:38 ` [PATCH v2 1/2] " Brian Lyles
2024-03-18 16:34   ` Junio C Hamano
2024-03-18  5:38 ` [PATCH v2 2/2] docs: adjust trailer `separator` and `key_value_separator` language Brian Lyles
2024-03-18  6:42   ` Linus Arver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq5xxjgxp4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=brianmlyles@gmail.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=linusa@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).