Handle hidden refs (#1774)

Co-authored-by: Chris Gavin <chris@chrisgavin.me>
这个提交包含在:
Orhan Toy
2024-06-12 17:01:40 +02:00
提交者 GitHub
父节点 b80ff79f17
当前提交 b17fe1e4d5
共有 3 个文件被更改,包括 20 次插入 和 2 次删除

查看文件

@ -67,6 +67,16 @@ describe('ref-helper tests', () => {
expect(checkoutInfo.startPoint).toBeFalsy()
})
it('getCheckoutInfo refs/', async () => {
const checkoutInfo = await refHelper.getCheckoutInfo(
git,
'refs/gh/queue/main/pr-123',
commit
)
expect(checkoutInfo.ref).toBe(commit)
expect(checkoutInfo.startPoint).toBeFalsy()
})
it('getCheckoutInfo unqualified branch only', async () => {
git.branchExists = jest.fn(async (remote: boolean, pattern: string) => {
return true