Skip to content

Commit

Permalink
Revert "fix(scripts/diff-features): fetch missing ref (#25679)"
Browse files Browse the repository at this point in the history
This reverts commit 3fd5f96.
  • Loading branch information
caugner committed Jan 17, 2025
1 parent 284a7ca commit f7a8769
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions scripts/diff-features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,9 @@ const enumerateFeatures = (ref = 'HEAD', quiet = false): string[] => {
// However, if `ref` is already checked out, then `git worktree add` fails. As
// long as you haven't checked out a detached HEAD for `ref`, then
// `git worktree add` for the hash succeeds.
const hash = (() => {
try {
return execSync(`git rev-parse --short ${ref}`, {
encoding: 'utf-8',
}).trim();
} catch (e) {
// See: https://github.com/mdn/browser-compat-data/issues/25678
if (process.env.GITHUB_ACTIONS === 'true') {
console.error(`::error::${e}`);
}

execSync(`git fetch origin ${ref}`);

return execSync(`git rev-parse --short ${ref}`, {
encoding: 'utf-8',
}).trim();
}
})();
const hash = execSync(`git rev-parse --short ${ref}`, {
encoding: 'utf-8',
}).trim();

const worktree = `__enumerating__${hash}`;

Expand Down

0 comments on commit f7a8769

Please sign in to comment.