Re: [PATCH v3 2/2] doc: revert: add discussion
- From
- Linus Arver <linusa@google.com>
- Date
- Aug 10, 2023, 21:50 UTC
- Message-ID
- <owly8raih8ho.fsf@fine.c.googlers.com>
- In-Reply-To
- <20230809171531.2564807-2-oswald.buddenhagen@gmx.de>
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:
Show 6 quoted lines
> 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".
Show 21 quoted lines
> --- > 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.