Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ref-helper.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ref-helper.ts b/src/ref-helper.ts
index 047e906..00a1d27 100644
--- a/src/ref-helper.ts
+++ b/src/ref-helper.ts
@@ -42,9 +42,13 @@ export async function getCheckoutInfo(
result.ref = `refs/remotes/pull/${branch}`
}
// refs/tags/
- else if (upperRef.startsWith('REFS/')) {
+ else if (upperRef.startsWith('REFS/TAGS/')) {
result.ref = ref
}
+ // refs/
+ else if (upperRef.startsWith('REFS/') && commit) {
+ result.ref = commit
+ }
// Unqualified ref, check for a matching branch or tag
else {
if (await git.branchExists(true, `origin/${ref}`)) {