Re: [PATCH v2] Avoid loading commits twice in log with diffs

2013-03-28 Thread Jeff King
On Thu, Mar 28, 2013 at 09:19:34AM +0100, Thomas Rast wrote: > However, fixing the commits is easy at least at the band-aid level. > They are triggered by log_tree_diff() invoking diff_tree_sha1() on > commits, which duly loads the specified object to dereference it to a > tree. Since log_tree_di

[PATCH v2] Avoid loading commits twice in log with diffs

2013-03-28 Thread Thomas Rast
If you run a log with diffs (such as -p, --raw, --stat etc.) the current code ends up loading many objects twice. For example, for 'log -3000 -p' my instrumentation said the objects loaded more than once are distributed as follows: 2008 blob 2103 commit 2678 tree Fixing blobs and trees wil