mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Git: suppress error message when loading brand new repo
This commit is contained in:
parent
f59c5a9a26
commit
c6b9ab174d
@ -1961,7 +1961,7 @@ void PROJECT_TREE_PANE::updateGitStatusIcons()
|
||||
// Get Current Branch
|
||||
|
||||
git_reference* currentBranchReference = nullptr;
|
||||
git_repository_head( ¤tBranchReference, repo );
|
||||
int rc = git_repository_head( ¤tBranchReference, repo );
|
||||
|
||||
PROJECT_TREE_ITEM* rootItem = GetItemIdData( kid );
|
||||
wxFileName rootFilename( rootItem->GetFileName() );
|
||||
@ -1976,6 +1976,11 @@ void PROJECT_TREE_PANE::updateGitStatusIcons()
|
||||
m_TreeProject->SetItemText( kid, filename + " [" + branchName + "]" );
|
||||
git_reference_free( currentBranchReference );
|
||||
}
|
||||
else if( rc == GIT_EUNBORNBRANCH )
|
||||
{
|
||||
// TODO: couldn't immediately figure out if libgit2 can return the name of an unborn branch
|
||||
// For now, just do nothing
|
||||
}
|
||||
else
|
||||
{
|
||||
if( giterr_last()->klass != m_gitLastError )
|
||||
|
Loading…
x
Reference in New Issue
Block a user