mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
feature: add an option to clean up ignored files when discard all changes in repo (#531)
This commit is contained in:
parent
a59600ce18
commit
4e57cd50cd
12 changed files with 104 additions and 46 deletions
|
@ -5,16 +5,16 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public class Clean : Command
|
||||
{
|
||||
public Clean(string repo)
|
||||
public Clean(string repo, bool includeIgnored)
|
||||
{
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
Args = "clean -qfd";
|
||||
Args = includeIgnored ? "clean -qfdx" : "clean -qfd";
|
||||
}
|
||||
|
||||
public Clean(string repo, List<string> files)
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
var builder = new StringBuilder();
|
||||
builder.Append("clean -qfd --");
|
||||
foreach (var f in files)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue