1.0.0 • Published 11 years ago
git-assert-clean v1.0.0
git-assert-clean 
Assert that the git working tree is clean
Installing
$ npm install git-assert-cleanAPI
assertClean([callback]) -> promise
Asserts that the working directory is clean. If it is clean, promise will be resolved with undefined. If it is not, promise will be rejected. If you pass a callback, it will be called with the error.
Promises:
assertClean()
.then(function () {
console.log('clean as a whistle!');
})
.catch(function (err) {
console.err(err);
console.log('git is dirty');
});Callbacks:
assertClean(function (err) {
if (!err) {
console.log('clean as a whistle!');
}
else {
console.err(err);
console.log('git is dirty');
}
});1.0.0
11 years ago