Subject: Re: How to do a reverse rebase?

From: Junio C Hamano <[email-masked]>
Date: Sun, 19 Aug 2007 23:33:29 -0700

"Shawn O. Pearce" <[email-masked]> writes:

>> Is there an easier way?
>
> I don't think so.  To do the merge of those files we need a working
> directory to operate in; that working directory is the one you have.

Actually, if the rebase is really tine compared to the
differences between the branches, we _could_ do that without
using the real work tree.

Prepare a "for rebase" index, with an empty temporary directory
as the work tree, and use the merge machinery to do the
necessary per-path and contents merge all inside that temporary
directory.  As the merge machiery is designed to be usable
inside an empty directory and treat "missing" work tree files as
if they are unchanged since index, the checkout in this
temporary directory would be kept to the minimum.