On Wed, 2009-04-15 at 15:35 -0400, Steve Scaffidi wrote: > Now... I edited a line in that file (MANIFEST.bak) > > vim MANIFEST.bak > git add . > git-diff --cached --summary -M > > Output: > rename MANIFEST => MANIFEST.bak (99%) > > It *still* knows it's a rename!
Git assumes two files are copies when they have at least 50% of their lines in common. That percentage is even tunable by putting a number after -M or -C, e.g. -M8 for 80%. It even abbreviates cross-directory moves nicely in log output. I moved a /css directory to /site_media/css and this is what "git log --stat -C" shows: {css => site_media/css}/blueprint/ie.css | 0 {css => site_media/css}/blueprint/print.css | 0 {css => site_media/css}/blueprint/screen.css | 0 I didn't attend the meeting so I don't know if this was covered, but one aspect of git that's very satisfying to me is that since the repository stores entire file tree snapshots and not just diffs to a previous version, all of the algorithms like diff, copy-detection, and merge are totally orthogonal to the repository structure. Either the algorithms or the storage format can easily be improved independently of the other. -- Jeremy _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm