@matheusbsbs / matheus-bagliano / commits / 6f4780f9df
Fork 0

diff --stat: do not do its own three-dashes.

I missed that "git-diff-* --stat" spits out three-dash separator on its own without being asked. Remove it. When we output commit log followed by diff, perhaps --patch-with-stat, for downstream consumer, we _would_ want the three-dash between the message and the diff material, but that logic belongs to the caller, not diff generator. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Apr 15, 2006 at 14:02 UTC 6f4780f9dfd3bc6b23f9ea66b3d49577e0a0c2f9
2 files changed +3 -3
diff.c
-2
@@ -245,8 +245,6 @@ static void show_stats(struct diffstat_t* data)
245 if (data->nr == 0)
246 return;
247
248 - printf("---\n");
249 -
248 for (i = 0; i < data->nr; i++) {
249 struct diffstat_file *file = data->files[i];
250
git.c
+3 -1
@@ -388,8 +388,10 @@ static int cmd_log(int argc, const char **argv, char **envp)
388 pretty_print_commit(commit_format, commit, ~0, buf,
389 LOGSIZE, abbrev);
390 printf("%s\n", buf);
391 - if (do_diff)
391 + if (do_diff) {
392 + printf("---\n");
393 log_tree_commit(&opt, commit);
394 + }
395 shown = 1;
396 free(commit->buffer);
397 commit->buffer = NULL;