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:
@@ -346,7 +346,7 @@
|
||||
{:else}
|
||||
<label class="clone-option-detail"><span>{isGerman ? "Seit" : "Since"}</span><input type="date" bind:value={shallowSince} disabled={isBusy} aria-invalid={!shallowSince.trim()} /></label>
|
||||
{/if}
|
||||
<label class="clone-option-detail"><span>{isGerman ? "Zusätzliche Flags" : "Custom flags"}</span><input bind:value={customFlags} autocomplete="off" spellcheck="false" placeholder="--recurse-submodules --single-branch" disabled={isBusy} /></label>
|
||||
<label class="clone-option-detail"><span>{isGerman ? "Zusätzliche Flags" : "Custom flags"}</span><input bind:value={customFlags} autocomplete="off" spellcheck="false" placeholder="--single-branch" disabled={isBusy} /></label>
|
||||
<small class="clone-option-help">{isGerman ? "Flags wie in der Git-Kommandozeile; verwaltete oder unsichere Flags werden abgewiesen." : "Enter flags as on the Git command line; managed or unsafe flags are rejected."}</small>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user