mirror of
https://github.com/actions/checkout.git
synced 2026-06-21 22:19:55 +08:00
Merge 02ade5d400 into 9c091bb21b
This commit is contained in:
commit
2b56774506
|
|
@ -195,7 +195,7 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
|
||||
// When all history is fetched, the ref we're interested in may have moved to a different
|
||||
// commit (push or force push). If so, fetch again with a targeted refspec.
|
||||
if (!(await refHelper.testRef(git, settings.ref, settings.commit))) {
|
||||
if (!settings.refs.startsWith("refs/tags") && !(await refHelper.testRef(git, settings.ref, settings.commit))) {
|
||||
refSpec = refHelper.getRefSpec(settings.ref, settings.commit)
|
||||
await git.fetch(refSpec, fetchOptions)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user