use get_cached_commit_buffer where appropriate
[gitweb.git] / builtin / rev-list.c
index e012ebe502cf57467fceb14ea3e01f30cd979313..3fcbf21c03a37b78edacca4810defa78c7cea915 100644 (file)
@@ -106,7 +106,7 @@ static void show_commit(struct commit *commit, void *data)
        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;