mirror of
https://github.com/actions/checkout.git
synced 2025-04-09 00:40:25 +02:00
Merge 02ade5d400ff291405e3aa22ada1a372ec60a58e into 85e6279cec87321a52edac9c87bce653a07cf6c2
This commit is contained in:
commit
cecb7b88c8
@ -179,7 +179,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
|
// 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.
|
// 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)
|
refSpec = refHelper.getRefSpec(settings.ref, settings.commit)
|
||||||
await git.fetch(refSpec, fetchOptions)
|
await git.fetch(refSpec, fetchOptions)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user