fix failing to commit since b15c864

(if it would not find core.commitComment config)
This commit is contained in:
extrawurst 2024-03-24 12:54:00 -07:00
parent 9c8c802b20
commit 540a95c160

View file

@ -130,7 +130,8 @@ pub fn commit_message_prettify(
let comment_char = repo(repo_path)?
.config()?
.get_string("core.commentChar")
.map(|char_string| char_string.chars().next())?
.ok()
.and_then(|char_string| char_string.chars().next())
.unwrap_or('#') as u8;
Ok(message_prettify(message, Some(comment_char))?)