From b4fb226bb782ac62898c426f1aaf6777dc3dd1f6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 20 Sep 2016 09:27:44 +0200 Subject: [PATCH] util: get_bool_cfg(): more debug output --- libimagstorestdhook/src/vcs/git/config.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libimagstorestdhook/src/vcs/git/config.rs b/libimagstorestdhook/src/vcs/git/config.rs index 25609cea..aca1652b 100644 --- a/libimagstorestdhook/src/vcs/git/config.rs +++ b/libimagstorestdhook/src/vcs/git/config.rs @@ -164,7 +164,10 @@ fn get_bool_cfg(cfg: Option<&Value>, name: &str, on_fail: bool, on_unavail: bool }, } }) - .unwrap_or(on_unavail) + .unwrap_or_else(|| { + debug!("No configuration to fetch {} from, assuming {}", name, on_unavail); + on_unavail + }) } /// Check whether the hook is enabled or not. If the config is not there, the hook is _enabled_ by