refactor: Improve logging where lacking

This commit is contained in:
Matan Kushner
2019-07-15 18:42:35 -04:00
parent feb6d8aec7
commit f7eedaf775
2 changed files with 66 additions and 7 deletions
+12 -2
View File
@@ -41,9 +41,19 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
module.set_style(module_style);
let ahead_behind = get_ahead_behind(&repository, &branch_name);
log::debug!("Repo ahead/behind: {:?}", ahead_behind);
if ahead_behind != Ok((0, 0)) {
log::debug!("Repo ahead/behind: {:?}", ahead_behind);
} else {
log::trace!("No ahead/behind found");
}
let stash_object = repository.revparse_single("refs/stash");
log::debug!("Stash object: {:?}", stash_object);
if stash_object.is_ok() {
log::debug!("Stash object: {:?}", stash_object);
} else {
log::trace!("No stash object found");
}
let repo_status = get_repo_status(&repository);
log::debug!("Repo status: {:?}", repo_status);