Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Add contrib/rerere-train script

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:25

Hi,

On Sat, 27 Sep 2008, Nanako Shiraishi wrote:
This script takes a range of commits (e.g. maint..next) as its 
arguments, recreates merge commits in the range to prime rr-cache 
database.
Cute idea.  However, I would _love_ to have this as an option to 
git-rerere, which would work in memory only.

This is how I would do it (if I had enough time to play with Git):

- teach merge_recursive_options not to write anything to the working 
  directory (should be relatively easy, as many parts of merge-recursive.c 
  already have no_wd/update_wd/!o->call_depth checks for that),

- refactor handle_file() in rerere.c to provide an in-memory-only version,

- teach rerere to call merge_recursive() with the in-memory-only option, 
  and then call the in-memory version of the handle_file() function for 
  all unmerged paths, using the resolutions from the given merge commit.

- then teach this new function to take an arbitrary commit range (but only 
  handling the two-parent merges within it).

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help