From 66b2ed09c2f0f212c5cd5c095c1f1052ecbb9491 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 20 Jan 2010 13:59:36 -0800 Subject: Fix "log" family not to be too agressive about showing notes Giving "Notes" information in the default output format of "log" and "show" is a sensible progress (the user has asked for it by having the notes), but for some commands (e.g. "format-patch") spewing notes into the formatted commit log message without being asked is too aggressive. Enable notes output only for "log", "show", "whatchanged" by default and only when the user didn't ask any specific --pretty/--format from the command line; users can explicitly override this default with --show-notes and --no-notes option. Parts of tests are taken from Jeff King's fix. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- log-tree.c | 1 + 1 file changed, 1 insertion(+) (limited to 'log-tree.c') diff --git a/log-tree.c b/log-tree.c index 0fdf159f8..27afcf697 100644 --- a/log-tree.c +++ b/log-tree.c @@ -284,6 +284,7 @@ void show_log(struct rev_info *opt) struct pretty_print_context ctx = {0}; opt->loginfo = NULL; + ctx.show_notes = opt->show_notes; if (!opt->verbose_header) { graph_show_commit(opt->graph); -- cgit v1.2.1