7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Clean up unused var

Turns out we didn't need that one
This commit is contained in:
Seth Hillbrand 2025-01-21 16:17:51 -08:00
parent dac7c9d4d7
commit 988d229bbf

View File

@ -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 );
}
}
}