mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-21 18:35:00 +00:00
feature: supports to de-initialize a submodule (#1272)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
1fef7a7baa
commit
b0c0c46441
9 changed files with 139 additions and 13 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue