mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-10-06 08:58:11 +03:00
fix: assure commit.gpgsign
is detected correctly
Avoid stringly comparison for what is definitely a boolean [as per the configuration](https://git-scm.com/docs/git-config#Documentation/git-config.txt-commitgpgSign).
This commit is contained in:
parent
93508d7e7c
commit
e3b8e2a5e5
@ -285,8 +285,8 @@ impl Repository {
|
||||
/// returns an oid of the new commit object
|
||||
pub fn commit_buffer(&self, buffer: String) -> Result<git2::Oid> {
|
||||
// check git config for gpg.signingkey
|
||||
let should_sign = self.0.config()?.get_string("commit.gpgSign");
|
||||
if should_sign.unwrap_or("false".to_string()) != "false" {
|
||||
let should_sign = self.0.config()?.get_bool("commit.gpgSign").unwrap_or(false);
|
||||
if should_sign {
|
||||
// TODO: support gpg.ssh.defaultKeyCommand to get the signing key if this value doesn't exist
|
||||
let signing_key = self.0.config()?.get_string("user.signingkey");
|
||||
if let Ok(signing_key) = signing_key {
|
||||
|
Loading…
Reference in New Issue
Block a user