|
From: | Dmitry Gutov |
Subject: | Re: RCS, again: another removed functionality: undo last-checkin |
Date: | Wed, 23 Sep 2015 08:54:18 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Thunderbird/41.0 |
On 09/22/2015 10:05 PM, Eli Zaretskii wrote:
And if we're going to warn about doing rollback either way, the second warning is more likely to fly under the user's radar ("why are you asking me this again? yes already!"), which is kinda bad.I meant a single warning, not 2 of them.
That sounds non-trivial: how is generic code to know that the Git backend intends to fall back to 'git revert'? Would warnings be backend-specific?
And having just one warning means it has to convey both the sense of danger *and* the choice of Git command to be used.
Thinking about the issue more, 'git reset' is not that dangerous. *Especially* if the changes have been pushed to the remote. So even if you 'git reset HEAD^', but the commit has been pushed already, you can undo the operation simply by doing 'git pull', among other ways.
But 'git reset' without '--hard' sets you up to easily create conflicting commits, so it does invite confusion.
So I think vc-rollback should error out (by default; that could be customizable) when the user tries to back out of an already-published commit (and the backend knows how to detect that), and suggest using vc-revert. Which will be a separate command. If those names seem too similar to someone, I welcome better suggestions.
[Prev in Thread] | Current Thread | [Next in Thread] |