Re: [PATCH] Support wholesale directory renames in fast-import
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 10, 2007, 14:14 UTC
- Message-ID
- <20070710141442.GM4436@spearce.org>
- In-Reply-To
- <20070710140338.GA18450@informatik.uni-freiburg.de>
Uwe Kleine-K??nig <ukleinek@informatik.uni-freiburg.de> wrote:
Show 7 quoted lines
> David Frech wrote: > > Now my challenge is that the svn dump doesn't *actually* say "rename > > a/ to b/"; it says "copy a/ to b/; delete a/", so I have to infer the > > rename. > > I don't know fast-import very well, but why not doing exactly what the > dump file suggests: copy a b; delete a ?
Because there is no copy operator in fast-import. So you cannot do "copy a b". Apparently that's what I should have implemented, as rename in Git really is as simple as the copy/delete pair. Ugh.
Copy isn't really that hard, it just can't be nearly as efficient as rename, as copying a subtree will force me to either duplicate data in memory or reload trees from disk to duplicate data in memory. But its a copy, so data duplication is expected. ;-)
I'll implement a copy opertor soon. Shouldn't be too difficult. Maybe someone else would like to take a shot at implementing it...
-- Shawn.