mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-13 22:42:53 +03:00
ecode: Visual improvements.
This commit is contained in:
@@ -49,6 +49,7 @@ std::string Git::branch( std::string projectDir ) {
|
||||
|
||||
bool Git::setProjectPath( std::string projectPath ) {
|
||||
mProjectPath = "";
|
||||
mGitFolder = "";
|
||||
FileInfo f( projectPath );
|
||||
if ( !f.isDirectory() )
|
||||
return false;
|
||||
@@ -57,8 +58,10 @@ bool Git::setProjectPath( std::string projectPath ) {
|
||||
std::string lPath;
|
||||
FileSystem::dirAddSlashAtEnd( path );
|
||||
while ( path != lPath ) {
|
||||
if ( FileSystem::fileExists( path + ".git" ) ) {
|
||||
std::string gitFolder( path + ".git" );
|
||||
if ( FileSystem::fileExists( gitFolder ) ) {
|
||||
mProjectPath = path;
|
||||
mGitFolder = std::move( gitFolder );
|
||||
return true;
|
||||
}
|
||||
lPath = path;
|
||||
@@ -67,6 +70,10 @@ bool Git::setProjectPath( std::string projectPath ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string& Git::getGitFolder() const {
|
||||
return mGitFolder;
|
||||
}
|
||||
|
||||
Git::Status Git::status( std::string projectDir ) {
|
||||
Status s;
|
||||
std::string buf;
|
||||
|
||||
Reference in New Issue
Block a user