Re: git-rerere observations and feature suggestions

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: <git@...>
Date: Monday, June 16, 2008 - 3:10 pm

Junio C Hamano <gitster@pobox.com> writes:


By the way, this safety is not a theoretical issue but has been a real
one.  I had two topics that changed the calling convention of the same
function in different ways, and when they were merged to 'pu', the
declaration, definition, and call sites existed on both of these branches
were handled beautifully by rerere.

Recording autoresolution would have been a wrong thing to do.  One of the
branches added a new call site to a file that was not among the ones that
conflicted in the merge between the two branches.  That call site, that
uses the calling convention of one branch, needed to be adjusted to
accomodate the change of calling convention from the other branch (from
textual merge's point of view, this has to be an evil merge).  I had to
make and keep a mental note about that new call site until both topics
graduated to 'master' (similar to your need to remember a particular merge
is resolved to removal right now).

To safely automate reapplication of such a merge, rerere needs to become
much more clever.

The conflicts rerere notices and records are strictly per blob.  A
conflicted merge to a blob is inspected and a "conflict signature", which
becomes the directory name under rr-cache, is computed.  We record the
conflicted blob as a whole as the preimage, and your hand resolution as a
whoe as the postimage.  Next time when you have a conflicted merge to a
blob, and the conflict has the exact same conflict signature, we run
three-way merge between the recorded preimage, postimage and the new
conflicted result.

If we want to handle new call sites added only on a single side, you
should be able to express something like "when a merge has a conflicted
blob with this conflict signature, look in the whole tree, even outside
the set of conflicted paths, and change this text to that".  This is too
much automation and I somehow think the potential for errors (both from
the tool and from the user) is too high.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 16, 7:01 am)
Re: git-rerere observations and feature suggestions, Johannes Schindelin, (Tue Jun 17, 6:24 am)
Re: git-rerere observations and feature suggestions, Jakub Narebski, (Mon Jun 16, 4:11 pm)
Re: git-rerere observations and feature suggestions, Junio C Hamano, (Mon Jun 16, 2:46 pm)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 23, 5:49 am)
Re: git-rerere observations and feature suggestions, Jeff King, (Mon Jun 23, 11:12 am)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 23, 11:22 am)
Re: git-rerere observations and feature suggestions, Peter Zijlstra, (Mon Jun 23, 10:19 am)
Re: git-rerere observations and feature suggestions, Peter Zijlstra, (Mon Jun 23, 10:26 am)
Re: git-rerere observations and feature suggestions, Junio C Hamano, (Mon Jun 16, 3:10 pm)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 16, 3:44 pm)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 16, 3:09 pm)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Wed Jun 18, 6:57 am)
Re: git-rerere observations and feature suggestions, Jakub Narebski, (Wed Jun 18, 6:01 pm)
Re: git-rerere observations and feature suggestions, Miklos Vajna, (Wed Jun 18, 6:38 pm)
Re: git-rerere observations and feature suggestions, Junio C Hamano, (Thu Jun 19, 3:30 am)
Re: git-rerere observations and feature suggestions, Miklos Vajna, (Thu Jun 19, 4:33 am)
Re: git-rerere observations and feature suggestions, Miklos Vajna, (Thu Jun 19, 6:06 am)
Re: git-rerere observations and feature suggestions, Miklos Vajna, (Thu Jun 19, 3:29 am)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Wed Jun 18, 7:36 am)
Re: git-rerere observations and feature suggestions, Miklos Vajna, (Wed Jun 18, 7:29 am)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Wed Jun 18, 2:43 pm)
Re: git-rerere observations and feature suggestions, Miklos Vajna, (Wed Jun 18, 3:53 pm)
Re: git-rerere observations and feature suggestions, Junio C Hamano, (Mon Jun 16, 4:50 pm)
Re: git-rerere observations and feature suggestions, Theodore Tso, (Mon Jun 16, 7:27 am)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 16, 3:52 pm)
Re: git-rerere observations and feature suggestions, Junio C Hamano, (Mon Jun 16, 4:25 pm)
Re: git-rerere observations and feature suggestions, Ingo Molnar, (Mon Jun 16, 4:46 pm)
Re: git-rerere observations and feature suggestions, Junio C Hamano, (Mon Jun 16, 5:37 pm)
Re: git-rerere observations and feature suggestions, Mike Hommey, (Mon Jun 16, 7:09 am)
Re: git-rerere observations and feature suggestions, Pierre Habouzit, (Mon Jun 16, 11:48 am)
Re: git-rerere observations and feature suggestions, Pierre Habouzit, (Mon Jun 16, 11:57 am)
Re: git-rerere observations and feature suggestions, Sverre Rabbelier, (Mon Jun 16, 12:18 pm)