Code

git-pickaxe: optimize by avoiding repeated read_sha1_file().
authorJunio C Hamano <junkio@cox.net>
Sun, 5 Nov 2006 19:51:41 +0000 (11:51 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 5 Nov 2006 19:51:41 +0000 (11:51 -0800)
commitc2e525d97f81bc178567cdf4dd7056ce6224eb58
tree5b210302aba903698fca69a9945ea383bd6306d1
parent2bc45477a53b9b7a5202a816b96c14428f683c38
git-pickaxe: optimize by avoiding repeated read_sha1_file().

It turns out that pickaxe reads the same blob repeatedly while
blame can reuse the blob already read for the parent when
handling a child commit when it's parent's turn to pass its
blame to the grandparent.  Have a cache in the origin structure
to keep the blob there, which will be garbage collected when the
origin loses the last reference to it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pickaxe.c