From: Emily Shaffer <emilyshaffer@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v3 2/3] CodingGuidelines: hint why we value clearly written log messages
Date: Thu, 3 Mar 2022 16:07:28 -0800 [thread overview]
Message-ID: <YiFYQBWBVq/HQULM@google.com> (raw)
In-Reply-To: <20220127190259.2470753-3-gitster@pobox.com>
On Thu, Jan 27, 2022 at 11:02:58AM -0800, Junio C Hamano wrote:
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> Documentation/CodingGuidelines | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
> index 0e27b5395d..c37c43186e 100644
> --- a/Documentation/CodingGuidelines
> +++ b/Documentation/CodingGuidelines
> @@ -26,6 +26,13 @@ code. For Git in general, a few rough rules are:
> go and fix it up."
> Cf. http://lkml.iu.edu/hypermail/linux/kernel/1001.3/01069.html
>
> + - Log messages to explain your changes are as important as the
> + changes themselves. Clearly written code and in-code comments
> + explain how the code works and what is assumed from the surrounding
> + context. The log messages explain what the changes wanted to
> + achieve and why the changes were necessary (more on this in the
> + accompanying SubmittingPatches document).
> +
One thing not listed here, that I often hope to find from the commit
message (and don't), is "why we did it this way instead of <other way>".
I am not sure how to phrase it in this document, though. Maybe:
The log messages explain what the changes wanted to achieve, any
decisions that were made between alternative approaches, and why the
changes were necessary (more on this in blah blah)
Or maybe "...whether any alternative approaches were considered..." fits
the form of the surrounding sentence better.
- Emily
> Make your code readable and sensible, and don't try to be clever.
>
> As for more concrete guidelines, just imitate the existing code
> --
> 2.35.0-177-g7d269f5170
>
next prev parent reply other threads:[~2022-03-04 0:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-23 20:37 [RFC] Contributor doc: more on the proposed log message Junio C Hamano
2022-01-23 21:32 ` brian m. carlson
2022-01-26 11:07 ` Kaartic Sivaraam
2022-01-26 23:42 ` [PATCH v2 0/3] contributor doc update around log messages Junio C Hamano
2022-01-26 23:42 ` [PATCH v2 1/3] SubmittingPatches: write problem statement in the log in the present tense Junio C Hamano
2022-01-26 23:42 ` [PATCH v2 2/3] CodingGuidelines: hint why we value clearly written log messages Junio C Hamano
2022-01-27 7:31 ` Eric Sunshine
2022-01-27 18:35 ` Junio C Hamano
2022-01-26 23:42 ` [PATCH v2 3/3] SubmittingPatches: explain why we care about " Junio C Hamano
2022-01-27 19:02 ` [PATCH v3 0/3] contributor doc update around " Junio C Hamano
2022-03-04 0:12 ` Emily Shaffer
2022-01-27 19:02 ` [PATCH v3 1/3] SubmittingPatches: write problem statement in the log in the present tense Junio C Hamano
2022-03-03 23:59 ` Emily Shaffer
2022-03-04 0:23 ` Junio C Hamano
2022-03-04 23:41 ` Emily Shaffer
2022-01-27 19:02 ` [PATCH v3 2/3] CodingGuidelines: hint why we value clearly written log messages Junio C Hamano
2022-03-04 0:07 ` Emily Shaffer [this message]
2022-03-04 0:27 ` Junio C Hamano
2022-04-14 6:51 ` Junio C Hamano
2022-04-14 14:04 ` Ævar Arnfjörð Bjarmason
2022-04-19 22:53 ` Emily Shaffer
2022-04-20 8:23 ` Junio C Hamano
2022-01-27 19:02 ` [PATCH v3 3/3] SubmittingPatches: explain why we care about " Junio C Hamano
2022-03-04 0:10 ` Emily Shaffer
2022-03-04 0:29 ` Junio C Hamano
2022-03-04 9:52 ` log messages > comments (was: [PATCH v3 3/3] SubmittingPatches: explain why we care about log messages) Ævar Arnfjörð Bjarmason
2022-03-04 19:41 ` log messages > comments Junio C Hamano
2022-03-04 21:30 ` Junio C Hamano
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=YiFYQBWBVq/HQULM@google.com \
--to=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.