diff options
| author | Orhan Toy <orhantoy@github.com> | 2024-06-12 17:01:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-12 11:01:40 -0400 |
| commit | 798b08b7113201b0aac9404bba2bdf31ca943949 (patch) | |
| tree | 4b17b6954bbaf43b4785ff738f01191cf00444ea /src/ref-helper.ts | |
| parent | 300c0f8bc3145127512c68abed424bbdf093c924 (diff) | |
Handle hidden refs (#1774)
Co-authored-by: Chris Gavin <chris@chrisgavin.me>
Diffstat (limited to 'src/ref-helper.ts')
| -rw-r--r-- | src/ref-helper.ts | 6 |
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}`)) { |
