Skip to content

Commit

Permalink
use protocol v2 for checking out repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rarmatei committed Dec 17, 2024
1 parent 62e06f3 commit e00ae96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions workflow-steps/cache/output/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@ var require_balanced_match = __commonJS({
}
});

// ../../node_modules/glob/node_modules/brace-expansion/index.js
// ../../node_modules/minimatch/node_modules/brace-expansion/index.js
var require_brace_expansion = __commonJS({
"../../node_modules/glob/node_modules/brace-expansion/index.js"(exports, module2) {
"../../node_modules/minimatch/node_modules/brace-expansion/index.js"(exports, module2) {
var concatMap = require_concat_map();
var balanced = require_balanced_match();
module2.exports = expandTop;
Expand Down Expand Up @@ -525,9 +525,9 @@ var require_brace_expansion = __commonJS({
}
});

// ../../node_modules/glob/node_modules/minimatch/minimatch.js
// ../../node_modules/minimatch/minimatch.js
var require_minimatch = __commonJS({
"../../node_modules/glob/node_modules/minimatch/minimatch.js"(exports, module2) {
"../../node_modules/minimatch/minimatch.js"(exports, module2) {
module2.exports = minimatch;
minimatch.Minimatch = Minimatch;
var path = function() {
Expand Down
8 changes: 4 additions & 4 deletions workflow-steps/cache/output/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ var require_balanced_match = __commonJS({
}
});

// ../../node_modules/glob/node_modules/brace-expansion/index.js
// ../../node_modules/minimatch/node_modules/brace-expansion/index.js
var require_brace_expansion = __commonJS({
"../../node_modules/glob/node_modules/brace-expansion/index.js"(exports, module2) {
"../../node_modules/minimatch/node_modules/brace-expansion/index.js"(exports, module2) {
var concatMap = require_concat_map();
var balanced = require_balanced_match();
module2.exports = expandTop;
Expand Down Expand Up @@ -520,9 +520,9 @@ var require_brace_expansion = __commonJS({
}
});

// ../../node_modules/glob/node_modules/minimatch/minimatch.js
// ../../node_modules/minimatch/minimatch.js
var require_minimatch = __commonJS({
"../../node_modules/glob/node_modules/minimatch/minimatch.js"(exports, module2) {
"../../node_modules/minimatch/minimatch.js"(exports, module2) {
module2.exports = minimatch;
minimatch.Minimatch = Minimatch;
var path = function() {
Expand Down
3 changes: 2 additions & 1 deletion workflow-steps/checkout/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ if (process.platform != 'win32') {
}
execSync('git init .');
execSync(`git remote add origin ${repoUrl}`);
execSync(`echo "GIT_REPOSITORY_URL=''" >> $NX_CLOUD_ENV`);

if (depth === '0') {
// Fetch all branches and tags if depth is 0
execSync(
'git fetch --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"',
'git fetch -c protocol.version=2 --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"',
);
} else {
// Fetch with specified depth
Expand Down
3 changes: 2 additions & 1 deletion workflow-steps/checkout/output/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ if (process.platform != "win32") {
}
(0, import_child_process.execSync)("git init .");
(0, import_child_process.execSync)(`git remote add origin ${repoUrl}`);
(0, import_child_process.execSync)(`echo "GIT_REPOSITORY_URL=''" >> $NX_CLOUD_ENV`);
if (depth === "0") {
(0, import_child_process.execSync)(
'git fetch --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"'
'git fetch -c protocol.version=2 --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"'
);
} else {
const tagsArg = fetchTags ? " --tags" : "--no-tags";
Expand Down

0 comments on commit e00ae96

Please sign in to comment.