(repositoryUrl, head)
| 193 | * @return {String} The path of the new repository. |
| 194 | */ |
| 195 | export async function gitDetachedHead(repositoryUrl, head) { |
| 196 | const cwd = temporaryDirectory(); |
| 197 | |
| 198 | await execa("git", ["init"], { cwd }); |
| 199 | await execa("git", ["remote", "add", "origin", repositoryUrl], { cwd }); |
| 200 | await execa("git", ["fetch", repositoryUrl], { cwd }); |
| 201 | await execa("git", ["checkout", head], { cwd }); |
| 202 | return cwd; |
| 203 | } |
| 204 | |
| 205 | export async function gitDetachedHeadFromBranch(repositoryUrl, branch, head) { |
| 206 | const cwd = temporaryDirectory(); |
no outgoing calls
no test coverage detected
searching dependent graphs…