mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: GPG signing settings.
* remove gpg format settings from repository's local setting * add support for X.509 format * ux style
This commit is contained in:
parent
38fd30d431
commit
4b0af79f73
7 changed files with 37 additions and 72 deletions
|
@ -2,24 +2,18 @@
|
|||
|
||||
namespace SourceGit.Models
|
||||
{
|
||||
public class GPGFormat(string name, string value, string desc)
|
||||
public class GPGFormat(string name, string value, string desc, string program, bool needFindProgram)
|
||||
{
|
||||
public string Name { get; set; } = name;
|
||||
public string Value { get; set; } = value;
|
||||
public string Desc { get; set; } = desc;
|
||||
public string Program { get; set; } = program;
|
||||
public bool NeedFindProgram { get; set; } = needFindProgram;
|
||||
|
||||
public static readonly GPGFormat OPENPGP = new GPGFormat("OPENPGP", "openpgp", "DEFAULT");
|
||||
|
||||
public static readonly GPGFormat SSH = new GPGFormat("SSH", "ssh", "Git >= 2.34.0");
|
||||
|
||||
public static readonly List<GPGFormat> Supported = new List<GPGFormat>() {
|
||||
OPENPGP,
|
||||
SSH,
|
||||
};
|
||||
|
||||
public bool Equals(GPGFormat other)
|
||||
{
|
||||
return Value == other.Value;
|
||||
}
|
||||
public static readonly List<GPGFormat> Supported = [
|
||||
new GPGFormat("OPENPGP", "openpgp", "DEFAULT", "gpg", true),
|
||||
new GPGFormat("X.509", "x509", "", "gpgsm", true),
|
||||
new GPGFormat("SSH", "ssh", "Requires Git >= 2.34.0", "ssh-keygen", false),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue