From: Robin Rosenberg Date: Thu, 27 Sep 2007 19:04:18 GMT Subject: Re: [PATCH] Add --no-rename to git-apply Message-ID: <200709272104.18510.robin.rosenberg@dewire.com> In-Reply-To: torsdag 27 september 2007 skrev Johannes Schindelin: > Robin said in a follow-up mail that he needs it for a payed-for SCM > (let's describe it as TransparentBox here), which insists on explicit > renames. > > But I suggest a simple script here which extracts from the diff the > renames, which outputs a script which renames the file(s) back and then > uses the TransparentBox' mv command: > > sed -n -e "/^rename from/N" \ > -e "s/^rename from \(.*\)\nrename to \(.*\)/mv \2 \1 \&\& tb mv \1 \2/p" \ > < diff.patch > I tried something like that (integrated in the script), and the bugger noticed it and refused to work as exepected, but now that I think about it should be possible to fool it. I have to give it a go again and see what really actually went wrong. -- robin