2024-02-05 23:08:37 -08:00
|
|
|
|
using System.Collections.Generic;
|
2021-04-29 06:22:17 -07:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
2021-04-29 05:05:55 -07:00
|
|
|
|
namespace SourceGit.Commands {
|
|
|
|
|
public class Clean : Command {
|
|
|
|
|
public Clean(string repo) {
|
2024-02-05 23:08:37 -08:00
|
|
|
|
WorkingDirectory = repo;
|
|
|
|
|
Context = repo;
|
2021-04-29 05:05:55 -07:00
|
|
|
|
Args = "clean -qfd";
|
|
|
|
|
}
|
2021-04-29 06:22:17 -07:00
|
|
|
|
|
|
|
|
|
public Clean(string repo, List<string> files) {
|
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
|
builder.Append("clean -qfd --");
|
|
|
|
|
foreach (var f in files) {
|
|
|
|
|
builder.Append(" \"");
|
|
|
|
|
builder.Append(f);
|
|
|
|
|
builder.Append("\"");
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
|
WorkingDirectory = repo;
|
|
|
|
|
Context = repo;
|
2021-04-29 06:22:17 -07:00
|
|
|
|
Args = builder.ToString();
|
|
|
|
|
}
|
2021-04-29 05:05:55 -07:00
|
|
|
|
}
|
|
|
|
|
}
|