fixed a potential bug in the git commit diffing when there is a file named HEAD

This commit is contained in:
Jan-Felix 2017-04-05 15:04:06 +02:00
parent 9f165c208b
commit 47e5e5c376

View File

@ -206,7 +206,7 @@ exports.add = function add(files, cwd) {
* @return {Promise} A promise.
*/
exports.commit = function commit(message, cwd) {
return spawn(git, ['diff-index', '--quiet', 'HEAD', '.'], cwd)
return spawn(git, ['diff-index', '--quiet', 'HEAD', '--', '.'], cwd)
.then(function() {
// nothing to commit
return Q.resolve();