Skip to content

Commit

Permalink
no default for fetch-depth
Browse files Browse the repository at this point in the history
  • Loading branch information
dacbd committed Oct 29, 2022
1 parent aae26ea commit 341475f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,12 @@ class CML {
fetchDepth = 0;
}
}
console.log(fetchDepth);
if (fetchDepth <= 0) {
return await exec('git fetch --all --unshallow');
if (fetchDepth !== undefined) {
if (fetchDepth <= 0) {
return await exec('git fetch --all --unshallow');
}
return await exec(`git fetch --all --depth=${fetchDepth}`);
}
return await exec(`git fetch --all --depth=${fetchDepth}`);
}

async prCreate(opts = {}) {
Expand Down

2 comments on commit 341475f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.