mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
enhance: do NOT query gpg.ssh.allowedSignersFile
every time while getting commit's signing status
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
c2e83778cc
commit
1adcf4dd80
3 changed files with 15 additions and 4 deletions
|
@ -2,13 +2,12 @@
|
|||
{
|
||||
public class QueryCommitSignInfo : Command
|
||||
{
|
||||
public QueryCommitSignInfo(string repo, string sha)
|
||||
public QueryCommitSignInfo(string repo, string sha, bool useFakeSignersFile)
|
||||
{
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
|
||||
var allowedSignersFile = new Config(repo).Get("gpg.ssh.allowedSignersFile");
|
||||
if (string.IsNullOrEmpty(allowedSignersFile))
|
||||
if (useFakeSignersFile)
|
||||
Args = $"-c gpg.ssh.allowedSignersFile=/dev/null show --no-show-signature --pretty=format:\"%G? %GK\" -s {sha}";
|
||||
else
|
||||
Args = $"show --no-show-signature --pretty=format:\"%G? %GK\" -s {sha}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue