From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sergey Organov Newsgroups: gmane.emacs.devel Subject: Re: Removing rollback from VC mode - request for comment Date: Thu, 11 Dec 2014 22:54:10 +0300 Message-ID: References: <20141211092138.6D5F6C008E@snark.thyrsus.com> <874mt2iksu.fsf@fencepost.gnu.org> <87fvcm8jf0.fsf@zigzag.favinet> <20141211125145.GB25499@thyrsus.com> <83d27qtar6.fsf@gnu.org> <20141211174508.GC581@thyrsus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1418327696 22888 80.91.229.3 (11 Dec 2014 19:54:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2014 19:54:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 11 20:54:49 2014 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 1Xz9p2-0003xj-QK for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2014 20:54:48 +0100 Original-Received: from localhost ([::1]:54127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz9p2-0005Ni-Fq for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2014 14:54:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz9ok-0005NV-Mx for emacs-devel@gnu.org; Thu, 11 Dec 2014 14:54:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz9of-00023X-32 for emacs-devel@gnu.org; Thu, 11 Dec 2014 14:54:30 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz9oe-00023M-SN for emacs-devel@gnu.org; Thu, 11 Dec 2014 14:54:25 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xz9od-0003Qv-G9 for emacs-devel@gnu.org; Thu, 11 Dec 2014 20:54:23 +0100 Original-Received: from 89.175.180.246 ([89.175.180.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Dec 2014 20:54:23 +0100 Original-Received: from sorganov by 89.175.180.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Dec 2014 20:54:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 89.175.180.246 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:179829 Archived-At: "Eric S. Raymond" writes: > Eli Zaretskii : >> > In other VCSes it would be difficult to even attempt this. >> >> ??? It's known as "reverse cherry-picking", and is AFAIK possible in >> Git, bzr, and hg. >> >> Or maybe I don't understand what ttn was alluding to. > > You don't, not quite. Reverse cherry pick doesn't actually do the git > equivalent of removing a delta; the history is not altered. Reverse > cherry pic only requires forward composition of a reversed patch onto > the current branch tip - a much, *much* more tractable problem. > > The git equivalent of actually removing a delta would be *really > hard*. Nah. Try git rebase --onto HEAD~7 HEAD~6 to kill HEAD~6 commit. > You'd have to apply a reverse patch (in effect) against the blob, then > against all of its successors, dealing with conflicts in some way. > All the downstream hashes would be invalidated. A mess. Yes, hashes would be invalidated. Not a big deal provided history was not yet published. > > This is why git only lets you remove tip deltas. Nah. See above. And, strictly speaking, Git doesn't work in terms of deltas, nor does it remove anything. To get rid of a few last commits, it only moves the branch pointer back, and from the POV of drawbacks of history rewrite I don't think it's too different from removing commit(s) in the middle. -- Sergey.