mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 18:46:29 +03:00
Make Git plugin less verbose.
This commit is contained in:
@@ -47,13 +47,11 @@ int Git::git( const std::string& args, const std::string& projectDir, std::strin
|
||||
p.readAllStdOut( buf );
|
||||
int retCode = 0;
|
||||
p.join( &retCode );
|
||||
if ( mLogLevel == LogLevel::Info ||
|
||||
( mLogLevel >= LogLevel::Warning && retCode != EXIT_SUCCESS ) ) {
|
||||
Log::instance()->writef( mLogLevel, "GitPlugin cmd in %s (%d): %s %s",
|
||||
if ( !mSilent || retCode != EXIT_SUCCESS ) {
|
||||
Log::instance()->writef( retCode != EXIT_SUCCESS ? LogLevel::Info : LogLevel::Debug,
|
||||
"GitPlugin cmd in %s (%d): %s %s",
|
||||
clock.getElapsedTime().toString(), retCode, mGitPath, args );
|
||||
}
|
||||
if ( !mSilent )
|
||||
Log::debug( "%s", buf );
|
||||
return retCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -349,10 +349,6 @@ class Git {
|
||||
|
||||
GitStatusReport statusFromShortStatusStr( const std::string_view& statusStr );
|
||||
|
||||
void setLogLevel( LogLevel logLevel ) { mLogLevel = logLevel; }
|
||||
|
||||
LogLevel getLogLevel() const { return mLogLevel; }
|
||||
|
||||
void setSilent( bool set ) { mSilent = set; }
|
||||
|
||||
bool isSilent() const { return mSilent; }
|
||||
@@ -370,7 +366,6 @@ class Git {
|
||||
std::string mProjectPath;
|
||||
std::string mGitFolder;
|
||||
std::vector<std::string> mSubModules;
|
||||
LogLevel mLogLevel{ LogLevel::Error };
|
||||
Mutex mSubModulesMutex;
|
||||
bool mSubModulesUpdated{ false };
|
||||
bool mSilent{ false };
|
||||
|
||||
@@ -230,7 +230,6 @@ void GitPlugin::load( PluginManager* pluginManager ) {
|
||||
}
|
||||
|
||||
mGit = std::make_unique<Git>( pluginManager->getWorkspaceFolder() );
|
||||
mGit->setLogLevel( Log::instance()->getLogLevelThreshold() );
|
||||
mGit->setSilent( mSilent );
|
||||
mGitFound = !mGit->getGitPath().empty();
|
||||
mProjectPath = mRepoSelected = mGit->getProjectPath();
|
||||
|
||||
Reference in New Issue
Block a user