new implementation

This commit is contained in:
2016-07-03 04:37:03 +02:00
parent 011ac2d7b4
commit 5d00afcdf0
16 changed files with 76 additions and 16 deletions

View File

@@ -3,7 +3,7 @@ import * as helpers from "./smartgit.helpers";
export let commit = (dirPathArg:string,commitMessage:string) => {
let done = plugins.Q.defer();
if(!plugins.smartfile.fs.isDirectory(plugins.path.join(dirPathArg,".git"))){
if(!helpers.isGitDirectory(dirPathArg)){
plugins.beautylog.error("smartgit.commit expects a valid git directory");
done.reject();
return done.promise;