From: Jeff King Date: Sun, 13 Jul 2014 06:42:17 +0000 (-0400) Subject: diff-tree: avoid lookup_unknown_object X-Git-Tag: v2.0.4~3^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b794ebeac9151af4a9136ef28a22a06c2afb17cc?hp=b794ebeac9151af4a9136ef28a22a06c2afb17cc diff-tree: avoid lookup_unknown_object We generally want to avoid lookup_unknown_object, because it results in allocating more memory for the object than may be strictly necessary. In this case, it is used to check whether we have an already-parsed object before calling parse_object, to save us from reading the object from disk. Using lookup_object would be fine for that purpose, but we can take it a step further. Since this code was written, parse_object already learned the "check lookup_object" optimization, so we can simply call parse_object directly. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---