feat(submodules): add submodule management and recursive clone
Add a new backend module to manage Git submodules (list, initialize/update, stage, sync, add) and expose Tauri commands (list_submodules, submodule_action, add_submodule). The implementation enforces safe relative paths, a maximum nesting depth, and guards (dirty/conflicted checks and initialization/no-op semantics) to avoid unsafe operations. Refactor clone logic to a testable run_git_clone_command and enable automatic initialization of submodules during clone by passing --recurse-submodules. Also disallow certain submodule-related custom clone flags so callers cannot override this behaviour. Update README with a Submodules section and add frontend components and types to surface submodule UI (dialogs, toolbar badge). Unit tests were added for submodule discovery, initialization/update semantics, and recursive clone behavior.
This commit is contained in:
@@ -491,3 +491,18 @@ export interface IntegrationBoard {
|
||||
export interface IntegrationBoardReference { title: string; webUrl: string; scope: string }
|
||||
|
||||
export interface IssueComment { id: string; author: string; body: string; createdAt: string; bodyHtml: boolean }
|
||||
|
||||
export interface GitSubmodule {
|
||||
name: string;
|
||||
path: string;
|
||||
owner_path: string;
|
||||
relative_path: string;
|
||||
full_path: string;
|
||||
url: string;
|
||||
branch: string | null;
|
||||
recorded_commit: string;
|
||||
local_commit: string | null;
|
||||
dirty: boolean;
|
||||
conflicted: boolean;
|
||||
depth: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user