Subject: Re: [PATCH v3 2/2] doc: revert: add discussion

From: Linus Arver <[email-masked]>
Date: Thu, 10 Aug 2023 14:50:59 -0700

Oswald Buddenhagen <[email-masked]> writes:

> while thinking about what to write, i came up with an idea for another
> improvement: with (implicit) --edit, the template message would end up
> being:
>
>  This reverts commit <sha1>,
>  because <PUT REASON HERE>.

This sounds great to me.

Nit: the "doc: revert: add discussion" subject line should probably be more
like "revert doc: suggest adding the 'why' behind reverts".

> ---
>  Documentation/git-revert.txt | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
> index d2e10d3dce..2b52dc89a8 100644
> --- a/Documentation/git-revert.txt
> +++ b/Documentation/git-revert.txt
> @@ -142,6 +142,16 @@ EXAMPLES
>  	changes. The revert only modifies the working tree and the
>  	index.
>
> +DISCUSSION
> +----------
> +
> +While git creates a basic commit message automatically, you really
> +should not leave it at that. In particular, it is _strongly_
> +recommended to explain why the original commit is being reverted.
> +Repeatedly reverting reversions yields increasingly unwieldy
> +commit subjects; latest when you arrive at 'Reapply "Reapply
> +"<original subject>""' you should get creative.

The word "latest" here sounds odd. Ditto for "get creative". How about
the following rewording?

    While git creates a basic commit message automatically, it is
    _strongly_ recommended to explain why the original commit is being
    reverted. In addition, repeatedly reverting the same commit will
    result in increasingly unwieldy subject lines, for example 'Reapply
    "Reapply "<original subject>""'. Please consider rewording such
    subject lines to reflect the reason why the original commit is being
    reapplied again.