| 1 | export const GIT_SERVICES = ['git-upload-pack', 'git-receive-pack'] as const; |
| 2 | |
| 3 | export type GitServiceName |
| 4 | |
| 5 | export function isGitServiceName(value |
| 6 | return GIT_SERVICES.includes |
| 7 | } |
| 8 | |
| 9 | export function toGitBinary(service |
| 10 | return service.replace |
| 11 | } |
| 12 | |
| 13 | /** The environment that lets git speak protocol v2, whose `ls-refs` sends only the refs a client asks for. Anything but an exact `version=2` keeps git on v0, so a client-supplied value never reaches git's environment. */ |
| 14 | export function protocolEnv(requested |
| 15 | return requested === |
| 16 | } |