Skip to content

Commit 29ffe64

Browse files
committed
Merge pull request #37 from d4rkr00t/stagged-fix
Use only file names when determining if the staging area is clean
2 parents 847901c + a069f8f commit 29ffe64

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/commitizen/staging.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ export {isClean};
77
* Asynchrounously determines if the staging area is clean
88
*/
99
function isClean(repoPath, done) {
10-
git.exec({cwd:repoPath, args: '--no-pager diff --cached', quiet: true}, function (err, stdout) {
10+
git.exec({cwd:repoPath, args: '--no-pager diff --cached --name-only', quiet: true}, function (err, stdout) {
1111
let stagingIsClean;
1212
if(stdout && isString(stdout) && stdout.trim().length>0)
1313
{
14-
stagingIsClean = false;
14+
stagingIsClean = false;
1515
} else {
1616
stagingIsClean = true;
1717
}
1818
done(stagingIsClean);
1919
});
20-
}
20+
}

0 commit comments

Comments
 (0)