[Top][All Lists]

[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: Wed, 01 Oct 2014 11:52:58 +0900

Stefan Monnier writes:

 > Sadly, the only DVCS which knew how to keep track of partial (aka
 > cherry-picked) merges were DaRCS and Arch, AFAIK.

But in those DVCSes you lose the DAG, and gain exponential behavior
for your trouble.  (Speaking of Darcs in the past tense isn't very
accurate, either, although at the moment they're in maintenance mode.)

Tom Lord's revc (aka Arch v3) was showing theoretical promise in this
direction: he based object storage (Arch's revision archive) on git's,
but also was able to manipulate changes (revid pairs).  I'm not sure
if he planned to add token replacement and similar Darcs-y features.

 > FWIW, Git suffers from the same problem, AFAIK.  Tho maybe Git has found
 > a clever way to handle them OK in practice, even though it doesn't
 > actually keep track of them either (along the lines of what it does for
 > file renames).

No, there's no trick in git for this.  It's just that the git
community has a culture of rebasing that is much more tolerant of loss
of actual history (as seen by the developer in a private workspace) as
long as the notional history (post rebase and pushed to public) makes
sense to the community.  In this view, a cherry-pick is sort of viewed
as a "reinvention" of the patch, even though it's actually a copy.

It's possible to do the equivalent of "bzr merge -i" in git using
filter-branch, but it's somewhat complex and there's no built-in
command for it.  git just counts on the locality of commits in a
branch (ie, commits different branches touch the same code
infrequently) when doing a three-way merge.  I don't think a
patch-tracking VCS like Darcs would do a better job, though -- you'd
end up with a conflict in that case too.

For future reference:

Git has an option to cherry-pick which inserts the revision[1]
cherry-picked in the commit log automatically.  I believe that changed
from default on to default off years ago, though.  So I guess it
wasn't considered as useful as saving bytes (and lines in log message
displays).  As Eli points out, it's *not* recorded in the DAG, maybe
that's why.

[1]  Indicating the change relative to the parent, not the state of
the tree.

reply via email to

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