Skip to content

Commit

Permalink
Merge pull request #37 from d4rkr00t/stagged-fix
Browse files Browse the repository at this point in the history
Use only file names when determining if the staging area is clean
  • Loading branch information
jimthedev committed Oct 22, 2015
2 parents 847901c + a069f8f commit 29ffe64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commitizen/staging.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export {isClean};
* Asynchrounously determines if the staging area is clean
*/
function isClean(repoPath, done) {
git.exec({cwd:repoPath, args: '--no-pager diff --cached', quiet: true}, function (err, stdout) {
git.exec({cwd:repoPath, args: '--no-pager diff --cached --name-only', quiet: true}, function (err, stdout) {
let stagingIsClean;
if(stdout && isString(stdout) && stdout.trim().length>0)
{
stagingIsClean = false;
stagingIsClean = false;
} else {
stagingIsClean = true;
}
done(stagingIsClean);
});
}
}

0 comments on commit 29ffe64

Please sign in to comment.