emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing rollback from VC mode - request for comment


From: Sergey Organov
Subject: Re: Removing rollback from VC mode - request for comment
Date: Thu, 11 Dec 2014 22:54:10 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

"Eric S. Raymond" <address@hidden> writes:

> Eli Zaretskii <address@hidden>:
>> > 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]