summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-06-10 17:40:46 -0400
committerJunio C Hamano <gitster@pobox.com>2014-06-13 12:08:17 -0700
commita97934d8205772ffd2a528a9e970af7dec725012 (patch)
tree3b05fc0118344324608d2ae16e0006639ccdf74b /object.c
parent152ff1ccebd822fd97f27d2a6c3fa2058f088fd8 (diff)
downloadgit-a97934d8205772ffd2a528a9e970af7dec725012.tar.gz
use get_cached_commit_buffer where appropriate
Some call sites check commit->buffer to see whether we have a cached buffer, and if so, do some work with it. In the long run we may want to switch these code paths to make their decision on a different boolean flag (because checking the cache may get a little more expensive in the future). But for now, we can easily support them by converting the calls to use get_cached_commit_buffer. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 44ca657204..67b6e3533d 100644
--- a/object.c
+++ b/object.c
@@ -197,7 +197,7 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t
if (commit) {
if (parse_commit_buffer(commit, buffer, size))
return NULL;
- if (!commit->buffer) {
+ if (!get_cached_commit_buffer(commit)) {
set_commit_buffer(commit, buffer);
*eaten_p = 1;
}