Re: [PATCH] Detect renames in diff family.
On Thu, May 19, 2005 at 09:19:28AM -0700, Linus Torvalds wrote:
Show 5 quoted lines
> In other words, let's say that we create a new architecture or a new
> filesystem, and we have tons of _new_ files, but not a lot of removed
> files. It would literally be very cool to see that the new files are based
> on contents of old files, and that it would thus potentially be very
> interesting to see a diff like
Subversion encourages exactly this with the 'svn cp' command.
Just as knowing when a file was renamed allows you to track the history
past its first appearance under the current name, 'cp' allows you to
follow the history even if the original name still exists. I have found
this useful more than once.
Now, whether you track this up front with an expensive commit or
use tools to discover the relationship at query time (ala your
why-rename-tracking-isnt-needed argument) is a different question. As
we all know, most tools ask the user to explicitly declare the
relationship at the time it happens with 'svn rename' and 'svn cp' or
the analog. But git could do the comparisons, with appropriate
heuristics, at the time someone asks.
Joel
--
Life's Little Instruction Book #335
"Every so often, push your luck."
Joel Becker
Senior Member of Technical Staff
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127