From 9588352391519f0bf8aee86e08e0f3dd70490456 Mon Sep 17 00:00:00 2001 From: Thomas Koutcher Date: Sun, 11 Jul 2021 21:54:33 +0200 Subject: [PATCH] Add auto-refresh to log view --- src/log.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index e4f89c848..15a05029e 100644 --- a/src/log.c +++ b/src/log.c @@ -68,8 +68,15 @@ log_open(struct view *view, enum open_flags flags) "--stat", use_mailmap_arg(), "%(logargs)", "%(cmdlineargs)", "%(revargs)", "--no-color", "--", "%(fileargs)", NULL }; + enum status_code code; - return begin_update(view, NULL, log_argv, flags); + code = begin_update(view, NULL, log_argv, flags); + if (code != SUCCESS) + return code; + + watch_register(&view->watch, WATCH_HEAD | WATCH_REFS); + + return SUCCESS; } static enum request