git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 29, 2008, 12:39 UTC
Message-ID
<alpine.DEB.1.00.0809291430050.16478@pacific.mpi-cbg.de.mpi-cbg.de>
In-Reply-To
<20080927204415.6117@nanako3.lavabit.com>
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

Previous: Nanako Shiraishi
Message 2 of 2 in “Add contrib/rerere-train script”
  1. Add contrib/rerere-train scriptNanako Shiraishi, Sep 27, 2008
  2. Johannes SchindelinSep 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.