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: Theodore Tso <tytso@...>, <git@...>
Date: Monday, June 16, 2008 - 5:37 pm

Ingo Molnar <mingo@elte.hu> writes:


The binary part of the index should be in network byte order and endian
safe.  But it is not necessary to share the index.  Well, if you think
about it, it would be mighty silly if index had any long term effect on
the operation of rerere, which is all about "I've done many conflict
resolutions in the past.  My work tree state (including the index) came
back to a state similar to the conflicted state I saw some time ago.
Let's reuse the previous resolution if we can."  You might have switched
branches, ran "reset --hard" and did 47 thousands different things to your
index since you resolved the conflict you are about to re-resolve ;-).

The replay and conflict recoding codepath of rerere goes like this:

 * read the index, list the paths that have conflicts;

 * inspect the conflicted blob to compute the conflict signature $sig and
   store the sig and path in MERGE_RR;

 * look into rr-cache/$sig; does it have already a conflict resolution
   recorded?

   - If so, modify the file in the working tree the same way to bring
     rr-cache/$sig/preimage to rr-cache/$sig/postimage by 3-way merge.

   - if not, record the file in the working tree as rr-cache/$sig/preimage

The resolution recording codepath goes like:

 * see if any paths listed in MERGE_RR is resolved in the index;

 * look into rr-cache/$sig for such resolved path.  Does it already record
   a resolution?

   - If not, we have a new resolution we can use.  Record it as
     rr-cache/$sig/postimage for later use.

So rerere _does_ look at the index to decide what entries in rr-cache are
relevant and applicable.  But other than that, it is not used.  I do not
think there is no reason copy index to be able to reuse rr-cache.

--
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)