diff options
author | Jeff King <peff@peff.net> | 2014-07-13 02:42:17 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-13 18:59:05 -0700 |
commit | fa96082617e07d988103854fb96c5e92b7587e72 (patch) | |
tree | e2b057838243a0e759fff2b2b7006ee618c81efb /t/t4018/cpp-struct-definition | |
parent | d66bebcbcfa46d72bb5008e1d211c0ea87200d86 (diff) | |
download | git-jk/alloc-commit-id.tar.gz |
diff-tree: avoid lookup_unknown_objectjk/alloc-commit-id
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/cpp-struct-definition')
0 files changed, 0 insertions, 0 deletions