From: Steffen Prohaska Date: Sun, 24 Jun 2007 07:08:16 GMT Subject: Re: [PATCH] transplant: move a series of commits to a different parent Message-ID: <9C4338DC-0C4A-4981-9EC9-2417513F629D@zib.de> In-Reply-To: <81b0412b0706231404hc8b4bc4xd5bc51c733d8ea69@mail.gmail.com> On Jun 23, 2007, at 11:04 PM, Alex Riesen wrote: >> git-transplant.sh >> >> transplant starts with the contents of and puts on top of >> it the contents of files if they are touched by the series of >> commits ... If a commit touches a file the content of >> this file is taken as it is in the commit. No merging is >> performed. Original authors, commiters, and commit messages are >> preserved. >> > [...] > # detached head > git checkout $(git rev-parse onto) && git format-patch --stdout > --full-index from..to|git am -3 No. This one tries to apply the _changes_ between from..to. What I need is the resulting _content_ of files modified between from..to. The _changes_ are already wrong because they are relative to the history. But the history was messed up by git-cvsimport, as I tried to explaine in my first mail in this thread. So the changes derived from the wrong history are useless. transplant only checks if a file is modified by a commit. If it is it takes the _content_ of the file in that commit. The changes from the parent commit, which you can find by format-patch, do not matter. I believe it's more like git-filter-branch, but I wasn't yet abel to tell git-filter-branch how to do the job. Steffen