Clones the specified Git head with respect to the detached flag.
(head: GitHead, detached = false)
| 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 | |
| 223 | export function installVirtualGitClientSpies(mockInstance = VirtualGitClient.createInstance()) { |