From: Jonathan Nieder <jrnieder@gmail.com>
To: Gal Paikin <paiking@google.com>
Cc: git@vger.kernel.org, ajp@google.com,
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>,
Nasser Grainawi <nasser@codeaurora.org>
Subject: Re: Updating the commit message for reverts
Date: Mon, 30 Dec 2019 11:59:15 -0800 [thread overview]
Message-ID: <20191230195915.GE57251@google.com> (raw)
In-Reply-To: <CAEsQYpNtgMgwjVSOYB9vn-YPvKyKPZ2yZ3NigAVe3PztTN4v8w@mail.gmail.com>
(not cc-ing the Gerrit list after all, since only members can post)
Hi Gal,
Gal Paikin wrote:
> I work on the Gerrit team and I would like to change the default
> behavior for suggested commit messages for Reverts.
Thanks for writing. I like it when tools behave consistently with one
another, so I'm glad you brought it up here.
> Currently, if the user is trying a change called '"Revert "change X"',
> the suggested commit message would be 'Revert "Revert "Change X""'
> which is silly, since sometimes users want to revert the same change
> many times.
For context, [1] is where this was discussed previously on the Gerrit
mailing list. Do you have more context? For example, have there been
reports from users requesting this kind of change?
For a bit of precedent, the Chromium project has some custom logic[2]
that rewrites a revert of a revert to "Reland". I kind of like that,
since it makes the intention behind the revert-of-revert a little
clearer.
If both reverts are clean, then the typical use case I can think of is
that a prerequisite was missing, hence the revert; after all the
prerequisites were in place, it was then safe to roll forward, hence
the reland. I would hope that the full commit messages for these
revert commits would provide this context since without that kind of
communication from the people involved, a reader is lost.
> The suggestion is to change the behavior to "Revert^N" instead of
> multiple Reverts one after another.
This would be replacing one kind of jargon with another, so it's not
clear to me that it would improve matters.
With Revert / Reland, we can forget the N altogether:
1. 'Do some great thing'
2. 'Revert "Do some great thing"'
3. 'Reland "Do some great thing"'
4. 'Revert "Do some great thing"'
5. (etc)
For the reader of the shortlog, it's not too important how long the
edit war has gone. The single word makes it clear what the commit
is going to do.
In the full commit message, I would hope that people put in some
explanation of the story so far to explain why they have gone
back-and-forth all these times.
Thanks and hope that helps,
Jonathan
[1] https://groups.google.com/d/msg/repo-discuss/edl43LcyEKE/f9Q65kOcBgAJ
[2] https://chromium-review.googlesource.com/c/infra/gerrit-plugins/chromium-behavior/+/757684
next prev parent reply other threads:[~2019-12-30 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-24 11:06 Updating the commit message for reverts Gal Paikin
2019-12-24 19:15 ` Junio C Hamano
2019-12-27 10:13 ` Gal Paikin
2019-12-28 13:20 ` Danh Doan
2019-12-30 16:52 ` Junio C Hamano
2019-12-30 19:55 ` Jonathan Nieder
2019-12-30 19:59 ` Jonathan Nieder [this message]
2019-12-30 20:33 ` Oswald Buddenhagen
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=20191230195915.GE57251@google.com \
--to=jrnieder@gmail.com \
--cc=ajp@google.com \
--cc=git@vger.kernel.org \
--cc=nasser@codeaurora.org \
--cc=oswald.buddenhagen@gmx.de \
--cc=paiking@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).