fix: commit stucks when using SSH formatted GPG signing with a key contains non-empty passphrase

This commit is contained in:
leo 2024-07-09 17:56:23 +08:00
parent 386c92fa28
commit 9db050e8c2
No known key found for this signature in database
5 changed files with 19 additions and 19 deletions

View file

@ -458,12 +458,8 @@ namespace SourceGit
var args = desktop.Args;
if (args.Length <= 1 || !args[0].Equals("--askpass", StringComparison.Ordinal))
return false;
var match = REG_ASKPASS().Match(args[1]);
if (!match.Success)
return false;
desktop.MainWindow = new Views.Askpass(Path.GetFileName(match.Groups[1].Value));
desktop.MainWindow = new Views.Askpass(args[1]);
return true;
}
@ -483,9 +479,6 @@ namespace SourceGit
}
}
[GeneratedRegex(@"Enter\s+passphrase\s*for\s*key\s*['""]([^'""]+)['""]\:\s*", RegexOptions.IgnoreCase)]
private static partial Regex REG_ASKPASS();
private ViewModels.Launcher _launcher = null;
private ResourceDictionary _activeLocale = null;
private ResourceDictionary _themeOverrides = null;