mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
- Create a worktree from a new or existing branch - Integrate a worktree branch into a target branch by merge commit or cherry-pick, with continue/abort on conflicts - Delete a worktree with keep, delete-local, or delete-local-and-remote branch options, using safe branch deletion for unmerged branches - Add a stash tab (list, push, apply, pop, drop) shared across a repository and its worktrees - Rename and delete branches, optionally deleting the remote branch and updating scheduled base branches - Detect in-progress merge, rebase, cherry-pick and revert operations and hand conflicts to an agent session - Generate commit messages from staged changes with the default model - Add a default git identity and saved per-repository identities written to git config - Unify git error mapping behind a typed error and one route helper; consolidate git mutations and cache invalidation - Update repository docs
16 lines
483 B
TypeScript
16 lines
483 B
TypeScript
export interface GitIdentityValues {
|
|
name?: string | null
|
|
email?: string | null
|
|
}
|
|
|
|
/**
|
|
* Formats a git identity as `Name <email>`, using explicit placeholders when a
|
|
* part is missing and a single fallback when nothing is configured.
|
|
*/
|
|
export function formatGitIdentity(identity: GitIdentityValues): string {
|
|
const name = identity.name
|
|
const email = identity.email
|
|
if (!name && !email) return 'Not configured'
|
|
return `${name || 'No name'} <${email || 'No email'}>`
|
|
}
|