summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-04-17 16:59:42 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-17 21:43:15 -0700
commiteab144ac49c18d981261c2d0ba964d6380d9f1da (patch)
tree00085821c84825ac7c47d974a9c8e3780282c236 /log-tree.c
parent9153983310a169a340bd1023dccafd80b70b05bc (diff)
downloadgit-eab144ac49c18d981261c2d0ba964d6380d9f1da.tar.gz
Log message printout cleanups (#2)
Here's a further patch on top of the previous one with cosmetic improvements (no "real" code changes, just trivial updates): - it gets the "---" before a diffstat right, including for the combined merge case. Righ now the logic is that we always use "---" when we have a diffstat, and an empty line otherwise. That's how I visually prefer it, but hey, it can be tweaked later. - I made "diff --cc/combined" add the "---/+++" header lines too. The thing won't be mistaken for a valid diff, since the "@@" lines have too many "@" characters (three or more), but it just makes it visually match a real diff, which at least to me makes a big difference in readability. Without them, it just looks very "wrong". I guess I should have taken the filename from each individual entry (and had one "---" file per parent), but I didn't even bother to try to see how that works, so this was the simple thing. With this, doing a git log --cc --patch-with-stat looks quite readable, I think. The only nagging issue - as far as I'm concerned - is that diffstats for merges are pretty questionable the way they are done now. I suspect it would be better to just have the _first_ diffstat, and always make the merge diffstat be the one for "result against first parent". Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c
index c0a4432022..9e5416427a 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -1,4 +1,3 @@
-
#include "cache.h"
#include "diff.h"
#include "commit.h"
@@ -55,7 +54,7 @@ int log_tree_diff_flush(struct rev_info *opt)
}
if (opt->loginfo && !opt->no_commit_id)
- show_log(opt, opt->loginfo, "\n");
+ show_log(opt, opt->loginfo, opt->diffopt.with_stat ? "---\n" : "\n");
diff_flush(&opt->diffopt);
return 1;
}