For example, I had a project where a program was converted to C++, piecewise. One file was originally
foo.c
, then foo.cpp
was created by copying and fixing the original C source. foo.c
was not removed until later, so for a few commits both existed simultaneously. Indeed this was in CVS, and I just imported the stuff to git, to work on newer stuff there.Now it was time to merge the line originating in CVS into the work branch. git merge just looked at the changes that needed to be merged all at once, and saw that
foo.c
was gone and foo.cpp
was new over that stretch, and that they were 95% similar, so it assumed this was a rename, and properly merged the rename into the work branch.That is the power of not doing or saving renames.