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>
else
putchar('\n');
- if (revs->verbose_header && commit->buffer) {
+ if (revs->verbose_header && get_cached_commit_buffer(commit)) {
struct strbuf buf = STRBUF_INIT;
struct pretty_print_context ctx = {0};
ctx.abbrev = revs->abbrev;
show_mergetag(opt, commit);
}
- if (!commit->buffer)
+ if (!get_cached_commit_buffer(commit))
return;
if (opt->show_notes) {
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;
}