From: Junio C Hamano <gitster@pobox.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] sequencer: beautify subject of reverts of reverts
Date: Tue, 28 Mar 2023 07:00:41 -0700 [thread overview]
Message-ID: <xmqq5yalj7qu.fsf@gitster.g> (raw)
In-Reply-To: ZCLqbmWsN/7Ihjg+@ugly
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:
>>That looks good. And the transformations are just:
>>
>> Revert " → Reapply "
>> Reapply " → Revert^3 "
>> Revert^<n> " → Revert^<n+1> "
>>
> i thought about that already, and concluded that it's getting a bit
> "too nerdy" and over-engineered.
I agree that Revert^<n> looks too nerdy, and suspect that it was
also one of the reasons why the old discussion thread died out, even
though nobody in the thread explicitly mentioned it as the reason
to reject it.
> ...
> but i don't mind, as long as `Revert "Revert "Revert "foo"""` cannot
> be argued to be canon any more.
At least, that form can be mechanically understood what it means
with a single rule (i.e. "count the leading Revert"), instead of
requiring a set of rules (i.e. "if it begins with Reapply, then that
is reverted twice, count Reapply, multiply by two, and then add the
number of Revert").
I personally prefer a format that conveys how things happened in a
way that can be easily understood, over a format that looks pretty
on surface but needs more special cases to understand what led to
the outcome it represents. But because reverting a commit ought to
be a rare event, and reverting a revert (or doing so recursively for
more levels) ought to be even rarer, it shouldn't matter all that
much either way how we phrase the reversion of a revert, or reversion
of such a reversion.
There will be folks who will complain no matter how we change the
way we phrase the reversion of a revert, while there may also be
other folks who like the change we make, and I feel that it would
not be worth my time to deal with the complaints for _this_
particular change that was proposed. As long as proponents for this
change promise to handle all such complaints on and off list, I am
fine with the change, though.
Having said all that, I think this change, if we were to apply,
should be described in the documentation. Perhaps something along
this line?
diff --git c/Documentation/git-revert.txt w/Documentation/git-revert.txt
index d2e10d3dce..d09311dd8a 100644
--- c/Documentation/git-revert.txt
+++ w/Documentation/git-revert.txt
@@ -31,6 +31,13 @@ both will discard uncommitted changes in your working directory.
See "Reset, restore and revert" in linkgit:git[1] for the differences
between the three commands.
+The command by default gives "Revert '<title>'" as the title to the
+resulting commit when reverting the original commit whose title is
+'<title>'. A commit that reverts such a reversion commit is given
+"Reapply '<title>' as its title. These can of course be edited in
+the editor when the reason for reverting is described.
+
+
OPTIONS
-------
<commit>...::
next prev parent reply other threads:[~2023-03-28 14:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 16:22 [PATCH] sequencer: beautify subject of reverts of reverts Oswald Buddenhagen
2023-03-25 10:39 ` Kristoffer Haugsbakk
2023-03-27 22:25 ` Junio C Hamano
2023-03-28 6:04 ` Kristoffer Haugsbakk
2023-03-28 13:23 ` Oswald Buddenhagen
2023-03-28 13:43 ` Kristoffer Haugsbakk
2023-03-28 14:00 ` Junio C Hamano [this message]
2023-03-28 14:02 ` 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=xmqq5yalj7qu.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=oswald.buddenhagen@gmx.de \
/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).