On Wed, Jul 01, 2015 at 07:49:45AM -0700, Oliver Schrenk wrote: > I want to migrate some legacy java code to scala whilst keeping git > history intact for each file. The idea was to do a very basic > conversion first, just doing ssyntactical changes first and have git > mark it only as a rename and go from there.
Why do you want this? What's the value in having history intact across an implementation language change? > But already the basic syntax changes push git over the similarity > edge, so now II have a deleted file, and a new file. My > understanding is then that I basically loose history as I don't see > the full history of the "new" file. `git log --follow <file>` > doesn't work. > > Can I mark file changes manually as a rename? Are there different > approaches? If I were to do this I'd do it in two steps, first a project wide `git mv foo.java foo.scala`, and then perform the syntax change necessary to make everything compile. (Of course that will result in an unbuildable project after that first commit, but a change of implementation language is clearly no little change so lifting the requirement that builds always succeed may be acceptable.) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Failure is not an option. It comes bundled with the software. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Description: PGP signature