mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
Git plugin fixes
This commit is contained in:
@@ -60,7 +60,9 @@ Git::Git( const std::string& projectDir, const std::string& gitPath ) : mGitPath
|
||||
int Git::git( const std::string& args, const std::string& projectDir, std::string& buf ) const {
|
||||
buf.clear();
|
||||
Process p;
|
||||
p.create( mGitPath, args, Process::CombinedStdoutStderr | Process::Options::NoWindow,
|
||||
p.create( mGitPath, args,
|
||||
Process::CombinedStdoutStderr | Process::Options::NoWindow |
|
||||
Process::Options::InheritEnvironment,
|
||||
{ { "LC_ALL", "en_US.UTF-8" } }, projectDir.empty() ? mProjectPath : projectDir );
|
||||
p.readAllStdOut( buf );
|
||||
int retCode;
|
||||
|
||||
@@ -1275,8 +1275,9 @@ void GitPlugin::runAsync( std::function<Git::Result()> fn, bool _updateStatus,
|
||||
if ( !mGit )
|
||||
return;
|
||||
mLoader->setVisible( true );
|
||||
mThreadPool->run( [&] {
|
||||
mThreadPool->run( [this, fn, _updateStatus, _updateBranches] {
|
||||
auto res = fn();
|
||||
getUISceneNode()->runOnMainThread( [this] { mLoader->setVisible( false ); } );
|
||||
if ( res.fail() ) {
|
||||
showMessage( LSPMessageType::Warning, res.result );
|
||||
return;
|
||||
@@ -1285,7 +1286,6 @@ void GitPlugin::runAsync( std::function<Git::Result()> fn, bool _updateStatus,
|
||||
updateBranches();
|
||||
if ( _updateStatus )
|
||||
updateStatus( true );
|
||||
getUISceneNode()->runOnMainThread( [this] { mLoader->setVisible( false ); } );
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user