MCPcopy Create free account
hub / github.com/anomalyco/opencode / assertGitIdentityConfigured

Function assertGitIdentityConfigured

github/index.ts:668–675  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

666}
667
668async function assertGitIdentityConfigured() {
669 const name = (await $`git config --get user.name`.nothrow()).stdout.toString().trim()
670 const email = (await $`git config --get user.email`.nothrow()).stdout.toString().trim()
671 if (name && email) return
672 throw new Error(
673 "Git author identity is missing in this environment. Configure user.name and user.email before committing.",
674 )
675}
676
677async function restoreGitConfig() {
678 if (gitConfig === undefined) return

Callers 3

pushToNewBranchFunction · 0.85
pushToLocalBranchFunction · 0.85
pushToForkBranchFunction · 0.85

Calls 1

nothrowMethod · 0.65

Tested by

no test coverage detected