co-author 0.1.3

Co-Author your git commits from the command line
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use git2::Config;

#[cfg_attr(test, mockall::automock)]
pub trait ConfProvider {
	fn get_editor(&self) -> Option<String>;
}

pub struct GitConfProvider;

impl ConfProvider for GitConfProvider {
	fn get_editor(&self) -> Option<String> {
		Config::open_default().ok()?.get_string("core.editor").ok()
	}
}