emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] trunk r117980: Merge from emacs-24; up to r117522.


From: Stephen J. Turnbull
Subject: Re: [Emacs-diffs] trunk r117980: Merge from emacs-24; up to r117522.
Date: Thu, 02 Oct 2014 10:48:15 +0900

Eli Zaretskii writes:
 > > Date: Wed, 01 Oct 2014 18:45:14 +0300
 > > From: Eli Zaretskii <address@hidden>
 > > Cc: address@hidden, address@hidden, address@hidden
 > > 
 > > > * Imagine a mergy graph on the branch being cherry-picked from. How do
 > > > you revert that mergy clump? What if there are merges from that into
 > > > the current branch?
 > > > 
 > > > ---o---o---o---o---o---o A
 > > >     \     /
 > > >      o---o---o---o B
 > > >       \     /
 > > >        o---o
 > > 
 > > Well, figure it out, and you get my thumbs-up!
 > 
 > Btw, it's a bit ironic that while there's a lot of pressure to rebase
 > branches instead of merging them, when these issues are discussed,
 > suddenly all kind of complex DAGs pop up all over the place.  If
 > rebasing is the word of the day, then you will almost never see such
 > DAGs.

I don't see the irony yet (the people who push rebasing are not
necessarily the same people who are explaining the technology), but
that's probably because I explain this as a difference of culture in
the git community vs. the Bazaar community.[1]  Same point, different
point of view.

The real problem as Stefan points out is that in these VCSes the
source of a cherry-pick is *not* part of the formal metadata of the
new commit (git cherry-pick -x is a typical *in*formal way to record
the information).

Git does have a (rarely used AFAIK) concept of "grafts", which are an
out of band record of equivalent (as revisions) commits.  This doesn't
work terribly well (if the commits point to different trees, the
relation is actually asymmetric), and is mostly useful in cases where
filter-branch is used to remove some commits near the root of the DAG,
but does not affect the trees (ie, it just reparents downstream
commits to earlier ancestors).

What we want here is a way to equivalence changes.  The obvious
representation of a change would be the corresponding SHA1 pair.
(However, as Darcs points out, there are useful "patches" that have
effects that cannot be reproduced using diff and patch (and the
token-replace patch is actually implemented in Darcs).  Whether those
patch types are "useful enough" probably depends on the language, the
project, and the programmers.)

Then the question would be how to use that information later.  Git
developers evidently don't have an idea or have an idea but decided it
wasn't terribly useful compared to the alternative (merge when you
care about history-in-place, rebase when you don't, where "you" refers
to a project-wide consensus or it all falls down).


Footnotes: 
[1]  Speaking of irony, has anybody else noticed the irony of calling
the bzr development process "Bazaar"?




reply via email to

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