mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 10:40:20 +03:00
Minor fixes.
This commit is contained in:
@@ -1140,7 +1140,7 @@ static void addCMake() {
|
||||
{ { "[%a_][%w_]*" }, "symbol" },
|
||||
},
|
||||
std::move( cmake_symbols ),
|
||||
"//",
|
||||
"#",
|
||||
{ "^cmake_minimum_required.*%c" } } );
|
||||
}
|
||||
|
||||
|
||||
@@ -1338,11 +1338,11 @@ void GitPlugin::buildSidePanelTab() {
|
||||
if ( id == "git-commit" ) {
|
||||
commit( repoPath );
|
||||
} else if ( id == "git-stage-all" ) {
|
||||
stage( model->getFiles( repoName( repoPath ),
|
||||
stage( model->getFiles( repoFullName( repoPath ),
|
||||
(Uint32)Git::GitStatusType::Untracked |
|
||||
(Uint32)Git::GitStatusType::Changed ) );
|
||||
} else if ( id == "git-unstage-all" ) {
|
||||
unstage( model->getFiles( repoName( repoPath ),
|
||||
unstage( model->getFiles( repoFullName( repoPath ),
|
||||
(Uint32)Git::GitStatusType::Staged ) );
|
||||
}
|
||||
} );
|
||||
@@ -1585,6 +1585,21 @@ std::string GitPlugin::repoName( const std::string& repoPath ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string GitPlugin::repoFullName( const std::string& repoPath ) {
|
||||
Lock l( mRepoMutex );
|
||||
for ( const auto& repo : mRepos ) {
|
||||
if ( repo.first == repoPath ) {
|
||||
if ( repoPath != mProjectPath ) {
|
||||
auto fullName( repo.first );
|
||||
FileSystem::filePathRemoveBasePath( mProjectPath, fullName );
|
||||
return fullName;
|
||||
}
|
||||
return repo.second;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string GitPlugin::repoPath( const std::string& repoName ) {
|
||||
Lock l( mRepoMutex );
|
||||
for ( const auto& repo : mRepos )
|
||||
|
||||
@@ -215,6 +215,8 @@ class GitPlugin : public PluginBase {
|
||||
|
||||
std::string repoPath( const std::string& repoName );
|
||||
|
||||
std::string repoFullName( const std::string& repoPath );
|
||||
|
||||
std::string fixFilePath( const std::string& file );
|
||||
|
||||
std::vector<std::string> fixFilePaths( const std::vector<std::string>& files );
|
||||
|
||||
Reference in New Issue
Block a user