Skip to content

Commit

Permalink
diff --stat: do not do its own three-dashes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Apr 15, 2006
1 parent 5069b1c commit 6f4780f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
4 changes: 3 additions & 1 deletion git.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6f4780f

Please sign in to comment.