#include "cache.h"
#include "commit.h"
-#include "revision.h"
#include "diff.h"
+#include "revision.h"
#include "log-tree.h"
#ifndef PATH_MAX
prepare_revision_walk(&rev);
setup_pager();
while ((commit = get_revision(&rev)) != NULL) {
- if (commit_format != CMIT_FMT_ONELINE && shown)
+ if (shown && do_diff && commit_format != CMIT_FMT_ONELINE)
putchar('\n');
fputs(commit_prefix, stdout);
if (abbrev_commit && abbrev)
if (do_diff)
log_tree_commit(&opt, commit);
shown = 1;
+ free(commit->buffer);
+ commit->buffer = NULL;
}
free(buf);
return 0;