MCPcopy Create free account
hub / github.com/angular/dev-infra / assertValidGitRef

Function assertValidGitRef

ng-dev/utils/git/git-client.ts:267–271  ·  view source on GitHub ↗
(ref: string)

Source from the content-addressed store, hash-verified

265
266/** Assert that a Git reference is valid and does not start with a hyphen. */
267export function assertValidGitRef(ref: string) {
268 if (ref.startsWith('-')) {
269 throw new Error(`Invalid Git reference: ${ref}`);
270 }
271}

Callers 3

hasCommitMethod · 0.85
checkoutMethod · 0.85
allChangesFilesSinceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected