feature: supports to de-initialize a submodule (#1272)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-21 20:34:33 +08:00
parent 1fef7a7baa
commit b0c0c46441
No known key found for this signature in database
9 changed files with 139 additions and 13 deletions

View file

@ -51,13 +51,15 @@ namespace SourceGit.Commands
return Exec();
}
public bool Delete(string relativePath)
public bool Deinit(string module, bool force)
{
Args = $"submodule deinit -f \"{relativePath}\"";
if (!Exec())
return false;
Args = force ? $"submodule deinit -f -- \"{module}\"" : $"submodule deinit -- \"{module}\"";
return Exec();
}
Args = $"rm -rf \"{relativePath}\"";
public bool Delete(string module)
{
Args = $"rm -rf \"{module}\"";
return Exec();
}
}