mirror of
https://github.com/actions/checkout.git
synced 2024-04-27 16:57:09 +08:00
Merge 1d3fa26c9e
into 8459bc0c7e
This commit is contained in:
commit
8e47b0835e
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -2110,7 +2110,8 @@ function testRef(git, ref, commit) {
|
|||||||
// refs/tags/
|
// refs/tags/
|
||||||
else if (upperRef.startsWith('REFS/TAGS/')) {
|
else if (upperRef.startsWith('REFS/TAGS/')) {
|
||||||
const tagName = ref.substring('refs/tags/'.length);
|
const tagName = ref.substring('refs/tags/'.length);
|
||||||
return ((yield git.tagExists(tagName)) && commit === (yield git.revParse(ref)));
|
return ((yield git.tagExists(tagName)) &&
|
||||||
|
commit === (yield git.revParse(`${ref}^{commit}`)));
|
||||||
}
|
}
|
||||||
// Unexpected
|
// Unexpected
|
||||||
else {
|
else {
|
||||||
|
@ -167,7 +167,8 @@ export async function testRef(
|
|||||||
else if (upperRef.startsWith('REFS/TAGS/')) {
|
else if (upperRef.startsWith('REFS/TAGS/')) {
|
||||||
const tagName = ref.substring('refs/tags/'.length)
|
const tagName = ref.substring('refs/tags/'.length)
|
||||||
return (
|
return (
|
||||||
(await git.tagExists(tagName)) && commit === (await git.revParse(ref))
|
(await git.tagExists(tagName)) &&
|
||||||
|
commit === (await git.revParse(`${ref}^{commit}`))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// Unexpected
|
// Unexpected
|
||||||
|
Loading…
Reference in New Issue
Block a user