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

Method _cloneHead

ng-dev/utils/testing/virtual-git-client.ts:214–220  ·  view source on GitHub ↗

Clones the specified Git head with respect to the detached flag.

(head: GitHead, detached = false)

Source from the content-addressed store, hash-verified

212
213 /** Clones the specified Git head with respect to the detached flag. */
214 private _cloneHead(head: GitHead, detached = false): GitHead {
215 return {
216 branch: detached ? undefined : head.branch,
217 ref: head.ref,
218 newCommits: [...head.newCommits],
219 };
220 }
221}
222
223export function installVirtualGitClientSpies(mockInstance = VirtualGitClient.createInstance()) {

Callers 2

_pushMethod · 0.95
_checkoutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected