mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
13 lines
426 B
TypeScript
13 lines
426 B
TypeScript
export const WORKTREE_CREATE_MAX_SUFFIX_ATTEMPTS = 100
|
|
|
|
export function getWorktreeCreateCandidate(value: string, suffix: number): string {
|
|
return suffix === 1 ? value : `${value}-${suffix}`
|
|
}
|
|
|
|
export function getBranchNameOverrideCandidate(
|
|
branchNameOverride: string | undefined,
|
|
suffix: number
|
|
): string | undefined {
|
|
return branchNameOverride ? getWorktreeCreateCandidate(branchNameOverride, suffix) : undefined
|
|
}
|