mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Git: do not try to get branch info if there isn't a repo
This commit is contained in:
parent
04387dd42f
commit
df70ce72b4
@ -639,10 +639,14 @@ void PROJECT_TREE_PANE::ReCreateTreePrj()
|
||||
if( ADVANCED_CFG::GetCfg().m_EnableGit )
|
||||
{
|
||||
m_TreeProject->SetGitRepo( get_git_repository_for_file( fn.GetPath().c_str() ) );
|
||||
|
||||
if( m_TreeProject->GetGitRepo() )
|
||||
{
|
||||
m_TreeProject->GitCommon()->SetUsername( Prj().GetLocalSettings().m_GitRepoUsername );
|
||||
m_TreeProject->GitCommon()->SetSSHKey( Prj().GetLocalSettings().m_GitSSHKey );
|
||||
m_TreeProject->GitCommon()->UpdateCurrentBranchInfo();
|
||||
}
|
||||
}
|
||||
|
||||
// We may have opened a legacy project, in which case GetProjectFileName will return the
|
||||
// name of the migrated (new format) file, which may not have been saved to disk yet.
|
||||
|
Loading…
x
Reference in New Issue
Block a user