Przeglądaj źródła

Changed git.initialCommit method to add all yet unversioned files.

Szymon Kupś 10 lat temu
rodzic
commit
0a97a4dc6f
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 1
      dev/tasks/tests/git.js
  2. 2 1
      dev/tasks/utils/git.js

+ 2 - 1
dev/tasks/tests/git.js

@@ -223,7 +223,8 @@ describe( 'utils', () => {
 				const repositoryPath = '/path/to/repo';
 				const commitCommands = [
 					`cd ${ repositoryPath }`,
-					`git commit -am "Initial commit for ${ pluginName }."`
+					`git add .`,
+					`git commit -m "Initial commit for ${ pluginName }."`
 				];
 				toRestore.push( shExecStub );
 

+ 2 - 1
dev/tasks/utils/git.js

@@ -163,7 +163,8 @@ module.exports = {
 	initialCommit( pluginName, repositoryPath ) {
 		const commitCommands = [
 			`cd ${ repositoryPath }`,
-			`git commit -am "Initial commit for ${ pluginName }."`
+			`git add .`,
+			`git commit -m "Initial commit for ${ pluginName }."`
 		];
 
 		tools.shExec( commitCommands.join( ' && ' ) );