Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15
DORMANTno replies

[PATCH] whatchanged: always show the header

From: Carlos Martín Nieto <hidden>
Date: 2016-06-15 22:51:02
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

If --quiet is passed and there is no patch output, log_tree_commit
will not print the log which is certainly not wanted.

Set the always_show_header option to fix this.

Signed-off-by: Carlos Martín Nieto <redacted>
---

With this, "--quiet" just means the same as "-s" by telling
log_tree_commit to output it. I still haven't completely understood
what the relationship between log_tree_commit, log_tree_diff and
log_tree_diff_flush is but AFAICS sometimes one function shows the log
and sometimes the other one shows it, which I guess has to do with the
QUICK option to diff.

I'm sending this now because it's a one-liner and is probably the
correct behaviour anyway, but a more general solution would be to
convert cmd_log_init to use the option parser and catch --quiet there,
maybe even making it mean the same as -s.

 builtin/log.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index 1ce00ba..b24ca8a 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -322,6 +322,7 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
 	init_revisions(&rev, prefix);
 	rev.diff = 1;
 	rev.simplify_history = 0;
+	rev.always_show_header = 1;
 	memset(&opt, 0, sizeof(opt));
 	opt.def = "HEAD";
 	cmd_log_init(argc, argv, prefix, &rev, &opt);
-- 
1.7.4.2.437.g4fc7e.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help