mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
eepp:
Minor fix in C++ syntax highlight. Improved TextDocument indentation guessing. UIMessageBox with type TEXT_EDIT now focuses the text edit by default. ecode: Allow to merge branches. If HEAD branch doesn't have origin, on commit + push it will push the new branch into origin.
This commit is contained in:
@@ -163,6 +163,14 @@ Git::Result Git::push( const std::string& projectDir ) {
|
||||
return gitSimple( "push", projectDir );
|
||||
}
|
||||
|
||||
Git::Result Git::pushNewBranch( const std::string& branch, const std::string& projectDir ) {
|
||||
return gitSimple(
|
||||
String::format(
|
||||
"push --porcelain --recurse-submodules=check origin refs/heads/%s:refs/heads/%s",
|
||||
branch, branch ),
|
||||
projectDir );
|
||||
}
|
||||
|
||||
Git::CheckoutResult Git::checkout( const std::string& branch,
|
||||
const std::string& projectDir ) const {
|
||||
std::string buf;
|
||||
@@ -250,6 +258,10 @@ Git::Result Git::deleteBranch( const std::string& branch, const std::string& pro
|
||||
return gitSimple( String::format( "branch -D %s", branch ), projectDir );
|
||||
}
|
||||
|
||||
Git::Result Git::mergeBranch( const std::string& branch, const std::string& projectDir ) {
|
||||
return gitSimple( String::format( "merge --no-ff %s", branch ), projectDir );
|
||||
}
|
||||
|
||||
Git::Result Git::commit( const std::string& commitMsg, bool ammend, bool byPassCommitHook,
|
||||
const std::string& projectDir ) {
|
||||
auto tmpPath = Sys::getTempPath() + ".ecode-git-commit-" + String::randString( 16 );
|
||||
|
||||
Reference in New Issue
Block a user