Browse Source

Clean up unused var

Turns out we didn't need that one
pcb_db
Seth Hillbrand 9 months ago
parent
commit
988d229bbf
  1. 7
      common/git/kicad_git_common.cpp

7
common/git/kicad_git_common.cpp

@ -465,7 +465,6 @@ void KIGIT_COMMON::updatePublicKeys()
wxTextFile configFile( sshConfig.GetFullPath() );
configFile.Open();
wxString lastIdentityFile;
bool match = false;
for( wxString line = configFile.GetFirstLine(); !configFile.Eof(); line = configFile.GetNextLine() )
@ -473,10 +472,7 @@ void KIGIT_COMMON::updatePublicKeys()
line.Trim( false ).Trim( true );
if( line.StartsWith( "Host " ) )
{
lastIdentityFile.Clear();
match = false;
}
// The difference here is that we are matching either "Hostname" or "Host" to get the
// match. This is because in the absence of a "Hostname" line, the "Host" line is used
@ -486,15 +482,14 @@ void KIGIT_COMMON::updatePublicKeys()
if( match && line.StartsWith( "IdentityFile" ) )
{
wxString keyPath = line.AfterFirst( ' ' ).Trim( false ).Trim( true );
// Expand ~ to home directory if present
if( keyPath.StartsWith( "~" ) )
keyPath.Replace( "~", wxGetHomeDir(), false );
// Add the public key to the beginning of the list
if( wxFileName::FileExists( keyPath ) )
{
SetSSHKey( keyPath );
}
}
}

Loading…
Cancel
Save