mirror of
				https://github.com/rschamp/gh-pages.git
				synced 2025-11-04 12:51:11 +08:00 
			
		
		
		
	fixed a potential bug in the git commit diffing when there is a file named HEAD
This commit is contained in:
		
							parent
							
								
									9f165c208b
								
							
						
					
					
						commit
						47e5e5c376
					
				@ -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();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user