File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 22{
33 public class QueryCommitSignInfo : Command
44 {
5- public QueryCommitSignInfo ( string repo , string sha )
5+ public QueryCommitSignInfo ( string repo , string sha , bool useFakeSignersFile )
66 {
77 WorkingDirectory = repo ;
88 Context = repo ;
99
10- var allowedSignersFile = new Config ( repo ) . Get ( "gpg.ssh.allowedSignersFile" ) ;
11- if ( string . IsNullOrEmpty ( allowedSignersFile ) )
10+ if ( useFakeSignersFile )
1211 Args = $ "-c gpg.ssh.allowedSignersFile=/dev/null show --no-show-signature --pretty=format:\" %G? %GK\" -s { sha } ";
1312 else
1413 Args = $ "show --no-show-signature --pretty=format:\" %G? %GK\" -s { sha } ";
Original file line number Diff line number Diff line change @@ -498,7 +498,7 @@ private void Refresh()
498498
499499 Task . Run ( ( ) =>
500500 {
501- var signInfo = new Commands . QueryCommitSignInfo ( _repo . FullPath , _commit . SHA ) . Result ( ) ;
501+ var signInfo = new Commands . QueryCommitSignInfo ( _repo . FullPath , _commit . SHA , ! _repo . HasAllowedSignersFile ) . Result ( ) ;
502502 Dispatcher . UIThread . Invoke ( ( ) => SignInfo = signInfo ) ;
503503 } ) ;
504504
Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ public Models.RepositorySettings Settings
4545 get => _settings ;
4646 }
4747
48+ public bool HasAllowedSignersFile
49+ {
50+ get => _hasAllowedSignersFile ;
51+ }
52+
4853 public int SelectedViewIndex
4954 {
5055 get => _selectedViewIndex ;
@@ -444,6 +449,12 @@ public void Close()
444449
445450 public void RefreshAll ( )
446451 {
452+ Task . Run ( ( ) =>
453+ {
454+ var allowedSignersFile = new Commands . Config ( _fullpath ) . Get ( "gpg.ssh.allowedSignersFile" ) ;
455+ _hasAllowedSignersFile = ! string . IsNullOrEmpty ( allowedSignersFile ) ;
456+ } ) ;
457+
447458 Task . Run ( ( ) =>
448459 {
449460 RefreshBranches ( ) ;
@@ -2135,6 +2146,7 @@ private void AutoFetchImpl(object sender)
21352146 private string _fullpath = string . Empty ;
21362147 private string _gitDir = string . Empty ;
21372148 private Models . RepositorySettings _settings = null ;
2149+ private bool _hasAllowedSignersFile = false ;
21382150
21392151 private Models . Watcher _watcher = null ;
21402152 private Histories _histories = null ;
You can’t perform that action at this time.
0 commit comments