From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: RCS, again: another removed functionality: undo last-checkin Date: Mon, 21 Sep 2015 10:58:22 +0200 Message-ID: <87si68du8h.fsf@fencepost.gnu.org> References: <87oagx6tzz.fsf@mat.ucm.es> <55FF4026.2050004@yandex.ru> <83si68nu4i.fsf@gnu.org> <87eghsfd3m.fsf@fencepost.gnu.org> <83k2rknr2c.fsf@gnu.org> <876134favu.fsf@fencepost.gnu.org> <83fv28nq58.fsf@gnu.org> <87wpvkdvo8.fsf@fencepost.gnu.org> <83eghsnp5y.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442825995 31753 80.91.229.3 (21 Sep 2015 08:59:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Sep 2015 08:59:55 +0000 (UTC) Cc: dgutov@yandex.ru, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 21 10:59:54 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zdwwy-0000YG-GC for ged-emacs-devel@m.gmane.org; Mon, 21 Sep 2015 10:59:52 +0200 Original-Received: from localhost ([::1]:56911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdwwx-0007pW-LK for ged-emacs-devel@m.gmane.org; Mon, 21 Sep 2015 04:59:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdwwa-0007kS-Ml for emacs-devel@gnu.org; Mon, 21 Sep 2015 04:59:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdwwZ-0008RX-Pt for emacs-devel@gnu.org; Mon, 21 Sep 2015 04:59:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdwwZ-0008RR-Nm; Mon, 21 Sep 2015 04:59:27 -0400 Original-Received: from localhost ([127.0.0.1]:48051 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZdwvW-0008SU-SV; Mon, 21 Sep 2015 04:59:27 -0400 Original-Received: by lola (Postfix, from userid 1000) id 3D68ADF40C; Mon, 21 Sep 2015 10:58:22 +0200 (CEST) In-Reply-To: <83eghsnp5y.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Sep 2015 11:37:45 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:190181 Archived-At: Eli Zaretskii writes: >> From: David Kastrup >> Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru >> Date: Mon, 21 Sep 2015 10:27:19 +0200 >> >> Eli Zaretskii writes: >> >> > OK, but what would you do instead, then, in the case where the commit >> > is on "staged", but not yet on master? >> >> You fix staging. > > Fix how? Remove the bad commit from the commit history. That's what we are talking about the whole time. > This discussion is about the meaning of "rollback" for Git. So what > I'm trying to figure out is whether there's some Git command other > than "revert" that the user who pushed a bad commit to "staged" should > perform to fix "staging". git reset --hard HEAD~1 in the simplest case. Or git rebase -i with a selective removal of commits. > If there's nothing to be done locally, With Git, you do everything locally first. While it is possible to do something like git push origin +origin/staging~1:staging and remove the top commit from the staging repository even without involving the current tree, such repository-only operations are pretty solidly outside of the reign of VC. > then "revert" is still a good interpretation of "rollback", even with > the workflow you describe, because in that workflow the user simply > should not invoke any rollbacks locally. But the usual thing is to "rollback", namely establish the _commit_ state from before the bad commit, when encountering a staging-only problem. Git's own development tree has "next", another branch which is frequently being reset rather than have anything reverted in it. Other projects have similar "tryout" branches. When you are using branches for proposing patches (like the review tool Gerrit does), you are supposed to _amend_ your proposals so that they look like they've been done correctly right from the start, rather than adding fixes on top. Again, this is rollback territory (or more frequently, git rebase -i territory). It is only both public and non-ephemeral branches which should not see history changes. -- David Kastrup