summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--diff.c2
-rw-r--r--git.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index f1b672d2dc..cda8d2069e 100644
--- a/diff.c
+++ b/diff.c
@@ -245,8 +245,6 @@ static void show_stats(struct diffstat_t* data)
if (data->nr == 0)
return;
- printf("---\n");
-
for (i = 0; i < data->nr; i++) {
struct diffstat_file *file = data->files[i];
diff --git a/git.c b/git.c
index 78ed403ed1..61265a8566 100644
--- a/git.c
+++ b/git.c
@@ -388,8 +388,10 @@ static int cmd_log(int argc, const char **argv, char **envp)
pretty_print_commit(commit_format, commit, ~0, buf,
LOGSIZE, abbrev);
printf("%s\n", buf);
- if (do_diff)
+ if (do_diff) {
+ printf("---\n");
log_tree_commit(&opt, commit);
+ }
shown = 1;
free(commit->buffer);
commit->buffer = NULL;