mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-02 11:36:30 +03:00
Minor fixes.
This commit is contained in:
@@ -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