Hi Heiner, On Wednesday 07 October 2009, Jens-Heiner Rechtien wrote:
> AFAIK the heuristic works only if the hash over the file is the same. A > slight change, for instance adapting the name of the file in the license > header (however stupid such a thing might be) will spoil the heuristic, > which is why git, like any other sane SCM, supports 'git mv' at least on > my system. Sorry to disappoint you, but 'git mv' is really just a shortcut. It has also the bright sides - as Kohei said, this works even when the files are not 100% identical after the move which gives you the nice features like that when you eg. split a file into 2, both share the history - impossible with an explicit <something> mv. For more info: http://git.or.cz/gitwiki/GitFaq#Whydoesgitnot.22track.22renames.3F http://permalink.gmane.org/gmane.comp.version-control.git/217 > I would be very disappointed if it does not explicitly record > the rename somewhere (in the index) and is only just the frontend to a > simple filesystem rename ... :-) I suppose this is just a terminology thing - "index" is the thing that remembers what is going to be committed - so of course, git mv works on the index, but just the way that it deletes the old file there, and introduces (or modifies, if it already exists) the new one, before all is committed. You might track the moves in the "commits", but it's not a good idea; if it is just a simple move, the ex-post heuristic is trivial, quick, and can never fail (the "blobs" of the 'source' and 'destination' have identical sha1), and when there was an additional change to the moved file, it makes more sense to track the content than the file name. And when you track content, it does not make sense to compute the changed lines at the time of commit, because it is expensive, and we can come up with a better algorithm later. Regards, Kendy --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tools.openoffice.org For additional commands, e-mail: dev-h...@tools.openoffice.org