This commit is contained in:
2016-07-04 04:59:39 +02:00
parent 7670698e84
commit 63c54ff790
3 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import * as plugins from "./smartgit.plugins";
import * as helpers from "./smartgit.helpers";
export let push = (dirPathArg:string, sourceArg:string = "", branchArg:string = "") => {
export let push = (dirPathArg:string, remoteNameArg:string = "", remoteBranchArg:string = "") => {
let done = plugins.Q.defer();
if(!helpers.isGitDirectory(dirPathArg)){
plugins.beautylog.error("smartgit.push expects a valid git directory");
@@ -9,7 +9,7 @@ export let push = (dirPathArg:string, sourceArg:string = "", branchArg:string =
return done.promise;
}
// if everything seems allright proceed
plugins.shelljs.exec(`(cd ${dirPathArg} && git status)`);
plugins.shelljs.exec(`(cd ${dirPathArg} && git push ${remoteNameArg} ${remoteBranchArg})`);
done.resolve();
return done.promise;
};