From 540a95c160a12b7ebef31b26ddea6a7a94ef996a Mon Sep 17 00:00:00 2001 From: extrawurst Date: Sun, 24 Mar 2024 12:54:00 -0700 Subject: [PATCH] fix failing to commit since b15c864 (if it would not find core.commitComment config) --- asyncgit/src/sync/commit.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asyncgit/src/sync/commit.rs b/asyncgit/src/sync/commit.rs index 36884a0b..2fa4a517 100644 --- a/asyncgit/src/sync/commit.rs +++ b/asyncgit/src/sync/commit.rs @@ -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))?)