Skip to content

Commit 540a95c

Browse files
committed
fix failing to commit since b15c864
(if it would not find core.commitComment config)
1 parent 9c8c802 commit 540a95c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

asyncgit/src/sync/commit.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ pub fn commit_message_prettify(
130130
let comment_char = repo(repo_path)?
131131
.config()?
132132
.get_string("core.commentChar")
133-
.map(|char_string| char_string.chars().next())?
133+
.ok()
134+
.and_then(|char_string| char_string.chars().next())
134135
.unwrap_or('#') as u8;
135136

136137
Ok(message_prettify(message, Some(comment_char))?)

0 commit comments

Comments
 (0)