(folder)
| 24 | // Throws if `folder` is not inside a git work tree. Callers turn this into a |
| 25 | // truthy callback error so God.js can keep walking up parent directories. |
| 26 | async function assertGitRepo(folder) { |
| 27 | const out = await runGit(folder, ['rev-parse', '--is-inside-work-tree']); |
| 28 | if (out.trim() !== 'true') { |
| 29 | throw new Error('Not a git work tree: ' + folder); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | async function getUrl(folder, data) { |
| 34 | // Preserve legacy behavior: the url is the `origin` remote url only. |