diff options
author | Concelare <113200622+Concelare@users.noreply.github.com> | 2024-03-22 22:12:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 15:12:08 -0700 |
commit | b15c8643c8692fc9f01508120709e12d50d8e26a (patch) | |
tree | 68288845b2eb7dfbef81215595a2d4a2c7f946b2 /src | |
parent | 3d06b54d2ce0bac8ea4b64c8cb6d6ce318bade2e (diff) |
Git Config Commit Comments (#2145)
Closes #2136
Diffstat (limited to 'src')
-rw-r--r-- | src/popups/commit.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/popups/commit.rs b/src/popups/commit.rs index cb68bd1f..36cef4e3 100644 --- a/src/popups/commit.rs +++ b/src/popups/commit.rs @@ -11,8 +11,9 @@ use crate::{ ui::style::SharedTheme, }; use anyhow::{bail, Ok, Result}; +use asyncgit::sync::commit::commit_message_prettify; use asyncgit::{ - cached, message_prettify, + cached, sync::{ self, get_config_string, CommitId, HookResult, PrepareCommitMsgSource, RepoPathRef, RepoState, @@ -195,7 +196,8 @@ impl CommitPopup { drop(file); std::fs::remove_file(&file_path)?; - message = message_prettify(message, Some(b'#'))?; + message = + commit_message_prettify(&self.repo.borrow(), message)?; self.input.set_text(message); self.input.show()?; @@ -254,8 +256,8 @@ impl CommitPopup { } } - //TODO: honor `core.commentChar` - let mut msg = message_prettify(msg, Some(b'#'))?; + let mut msg = + commit_message_prettify(&self.repo.borrow(), msg)?; if verify { // run commit message check hook - can reject commit |