Merge 02ade5d400ff291405e3aa22ada1a372ec60a58e into 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0

This commit is contained in:
brian m. carlson 2026-06-21 05:43:33 +00:00 committed by GitHub
commit 2b56774506
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 // 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)