Write absolute path to commit.template config var
This means that `git-mob` will work in git submodules. Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
This commit is contained in:
parent
6820d9b3ae
commit
8ec0cba227
|
|
@ -49,9 +49,10 @@ pub fn set_main_author(author: &Author) {
|
||||||
pub fn ensure_commit_template_is_set() {
|
pub fn ensure_commit_template_is_set() {
|
||||||
with_git_repo_or_exit(|repo| {
|
with_git_repo_or_exit(|repo| {
|
||||||
let mut config = repo.config().unwrap();
|
let mut config = repo.config().unwrap();
|
||||||
config
|
let template_path = repo.path().join(".gitmessage");
|
||||||
.set_str("commit.template", ".git/.gitmessage")
|
if let Some(template_path) = template_path.to_str() {
|
||||||
.unwrap();
|
config.set_str("commit.template", template_path).unwrap();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue