diff options
author | extrawurst <mail@rusticorn.com> | 2024-03-24 12:54:00 -0700 |
---|---|---|
committer | extrawurst <mail@rusticorn.com> | 2024-03-24 12:54:00 -0700 |
commit | 540a95c160a12b7ebef31b26ddea6a7a94ef996a (patch) | |
tree | 02dfd357a17d680e100ab1ed5e38be48c246746e | |
parent | 9c8c802b207224ec3644042eb5139bd96f62a603 (diff) |
fix failing to commit since b15c864
(if it would not find core.commitComment config)
-rw-r--r-- | asyncgit/src/sync/commit.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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))?) |