mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
feat(git): extend source control with worktrees, stashes, conflicts and identities
- 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
This commit is contained in:
1 parent
52b6147ed3
commit
53238a6324
89 files changed
+7704
-793
No files matched your search
@@ -56,6 +56,20 @@ export function sanitizeBranchForDirectory(branch: string): string {
|
||||
return branch.replace(/[\\/]/g, '-')
|
||||
}
|
||||
|
||||
export function getBranchNameError(name: string): string | null {
|
||||
const trimmed = name.trim()
|
||||
|
||||
if (!trimmed) {
|
||||
return 'Branch name is required'
|
||||
}
|
||||
|
||||
if (trimmed.startsWith('-')) {
|
||||
return 'Branch name must not start with "-"'
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export function isWorktreeSibling(sibling: { worktreeStrategy?: string }): boolean {
|
||||
return sibling.worktreeStrategy !== undefined
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user