mirror of
https://github.com/rschamp/gh-pages.git
synced 2026-02-10 02:53:45 +08:00
fixed a potential bug in the git commit diffing when there is a file named HEAD
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user