develooper Front page | perl.perl5.porters | Postings from February 2009

Re: understanding merge history

Thread Previous | Thread Next
Dave Mitchell
February 4, 2009 13:28
Re: understanding merge history
Message ID:
On Tue, Feb 03, 2009 at 08:20:44AM +1300, Sam Vilain wrote:
> On Mon, 2009-02-02 at 17:15 +0000, Dave Mitchell wrote:
> > There are two problems with this. First, the D1 and D2 picks are
> > likely to have conflicts, and I have to resolve, repeating work
> > (possibly erroneously) already done by E's committer.
>  [...]
> > > If you want to perform a merge and re-use merge resolutions from another
> > > commit, which is about all the sense I can possibly make from the desire
> > > to cherry pick a merge, then the program to use is called git-rerere.
> > > It stores resolution information which is useful for avoiding repeating
> > > merges; I don't know if it can just be pointed at an arbitrary merge and
> > > update its resolution cache from that, but if it's not you can almost
> > > certainly fool it into doing so, with appropriate use of git-reset and
> > > so on.
> > 
> > I don't think that will help much in this scenario.
> So ... use of git-rerere will mean that the merge resolution from E will
> apply when you try to do a merge/cherry pick that conflicts sufficiently
> similarly to E.  How is that not helping much?

Perhaps I was misunderstanding rerere. I assumed it would only replay
identical resolves on the same branch, rather than being able to cope with
slightly different resolves on a different branch.

However, after playing with it just now I can't seem to get it to work in
the initial phase of recording a resolve that has previously taken place.

Given three commits A,B M, where M is a previous merge of A,B:


I tried the following:

git checkout A
git merge B		# replay the initial conflict
git rerere clear
git rerere		# record the initial conflict state

git reset --hard M	# simulate the post-resolve state
git rerere		# and record it

But then

    git rerere diff
    git rerere status

both show nothing, so I'm assuming it didn't manage to capture anything.

"The GPL violates the U.S. Constitution, together with copyright,
antitrust and export control laws"
    -- SCO smoking crack again.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About