Add BranchCommitID to modules/got and route GetBranchCommitID through it. Cover existing and missing branches and the no-fallback case.
Assisted-by: OpenCode:DeepSeek-V4.1-Flash
Use got ref -s when the target branch exists and write HEAD atomically for unborn branches, where got ref -s cannot operate. Route git.SetDefaultBranch through the got wrapper and cover both paths plus the no-bypass case in tests.
Assisted-by: OpenCode:DeepSeek-V4.1-Flash
Add IsEmpty and DefaultBranch to modules/got and route Repository.IsEmpty and GetDefaultBranch through them. Keep SetDefaultBranch on git because got ref -s requires the target branch to exist, which excludes unborn branches. Cover the wiring and the no-fallback behaviour with tests.
Assisted-by: OpenCode:DeepSeek-V4.1-Flash
Add modules/got with a got runner, version check, repository detection, and idempotent bare init. Route bare repository creation from InitRepositoryLocal through got; non-bare temp worktrees keep git. Add [git] GOT_PATH and tests, including an explicit no-fallback test.
Assisted-by: OpenCode:DeepSeek-V4.1-Flash