Skip to content

Commit

Permalink
fix(cli): Make gz -a working again (#573)
Browse files Browse the repository at this point in the history
closes #543
  • Loading branch information
thierrymichel authored and jimthedev committed Oct 3, 2018
1 parent b81dcb3 commit 7c4703b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commitizen/staging.js
Expand Up @@ -6,7 +6,7 @@ export { isClean };
* Asynchrounously determines if the staging area is clean
*/
function isClean (repoPath, done) {
exec('git diff --cached --name-only', {
exec('git diff --no-ext-diff --name-only && git diff --no-ext-diff --cached --name-only', {
maxBuffer: Infinity,
cwd: repoPath || process.cwd()
}, function (error, stdout) {
Expand Down
15 changes: 13 additions & 2 deletions test/tests/staging.js
Expand Up @@ -63,9 +63,20 @@ describe('staging', function () {
staging.isClean(repoConfig.path, function (afterWriteStagingIsCleanError, afterWriteStagingIsClean) {
expect(afterWriteStagingIsCleanError).to.be.null;
expect(afterWriteStagingIsClean).to.be.false;
done();
});

writeFilesToPath({
dummymodified: {
contents: repoConfig.files.dummyfile.contents + '-modified',
filename: repoConfig.files.dummyfile.filename,
}
}, repoConfig.path);

staging.isClean(repoConfig.path, function (afterWriteStagingIsCleanError, afterWriteStagingIsClean) {
expect(afterWriteStagingIsCleanError).to.be.null;
expect(afterWriteStagingIsClean).to.be.false;
done();
});
});
});
});
});
Expand Down

0 comments on commit 7c4703b

Please sign in to comment.