Skip to content

Commit 0da3f5e

Browse files
committed
Addressing code review feedback.
1 parent e5a5262 commit 0da3f5e

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

tools/gutenberg/checkout.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,13 @@ async function main( force ) {
156156
// Fetch and checkout target ref
157157
console.log( `\n📡 Fetching and checking out: ${ ref }` );
158158
try {
159-
// Fetch the specific ref (works for branches, tags, and commit hashes)
159+
// Fetch the specific ref (works for branches, tags, and commit hashes).
160160
await exec( 'git', [ 'fetch', '--depth', '1', 'origin', ref ], {
161161
cwd: gutenbergDir,
162162
} );
163163

164164
if ( force ) {
165-
// Hard-reset the index and working tree to FETCH_HEAD, discarding
166-
// any local modifications. This is the reliable path for --force.
165+
// Hard-reset the index and working tree to FETCH_HEAD, discarding any local modifications.
167166
await exec( 'git', [ 'reset', '--hard', 'FETCH_HEAD' ], {
168167
cwd: gutenbergDir,
169168
} );

tools/gutenberg/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ const path = require( 'path' );
1616
const { spawnSync } = require( 'child_process' );
1717
const dotenv = require( 'dotenv' );
1818
const dotenvExpand = require( 'dotenv-expand' );
19-
20-
// Paths
2119
const rootDir = path.resolve( __dirname, '../..' );
2220
const gutenbergDir = path.join( rootDir, 'gutenberg' );
2321

@@ -42,7 +40,7 @@ const gutenbergRepoHashFile = path.join( rootDir, '.gutenberg-repo-hash' );
4240
* Directories inside gutenberg/ to exclude when hashing.
4341
* These are build artefacts or dependency caches, not source files.
4442
*/
45-
const DIR_HASH_EXCLUDE = new Set( [ 'build', 'node_modules', '.git' ] );
43+
const DIR_HASH_EXCLUDE = new Set( [ '.git', 'node_modules', 'phpunit', 'platform-docs', 'tests', 'vendor' ] );
4644

4745
// Load .env so GUTENBERG_LOCAL_REPO and other vars are available regardless
4846
// of how this module is invoked (grunt task, direct node call, postinstall).

0 commit comments

Comments
 (0)