mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix: repo directory name collisions and custom directory support (#241)
* fix: repo directory name collisions and custom directory support Allow users to specify a custom directory name when adding a remote repo, preventing collisions when cloning a fork of an already-cloned repo. - Add shared validation and normalization utilities (shared/src/utils/repo.ts) for directory name sanitization, URL normalization, and path safety - Replace duplicated sanitizeWorkspaceAliasSegment with shared helper - Backend validates directoryName before use as filesystem path - Frontend detects directory collisions with normalized URL comparison - Move SSH credential setup after DB record creation * add backend origin validation and base-directory collision detection * fix potential ReDoS in repo url and directory name normalization
This commit is contained in:
1 parent
932d6b8d68
commit
60ed756a0b
7 files changed
+216
-29
No files matched your search
@@ -7,6 +7,7 @@ export interface CreateRepoOptions {
|
||||
repoUrl?: string
|
||||
localPath?: string
|
||||
branch?: string
|
||||
directoryName?: string
|
||||
openCodeConfigName?: string
|
||||
useWorktree?: boolean
|
||||
skipSSHVerification?: boolean
|
||||
|
||||
Reference in new issue
Block a user