2024-02-05 23:08:37 -08:00
|
|
|
|
namespace SourceGit.Commands {
|
2021-04-29 05:05:55 -07:00
|
|
|
|
public class Apply : Command {
|
2024-02-27 05:13:52 -08:00
|
|
|
|
public Apply(string repo, string file, bool ignoreWhitespace, string whitespaceMode, string extra) {
|
2024-02-05 23:08:37 -08:00
|
|
|
|
WorkingDirectory = repo;
|
|
|
|
|
Context = repo;
|
2021-04-29 05:05:55 -07:00
|
|
|
|
Args = "apply ";
|
|
|
|
|
if (ignoreWhitespace) Args += "--ignore-whitespace ";
|
|
|
|
|
else Args += $"--whitespace={whitespaceMode} ";
|
2024-02-27 05:13:52 -08:00
|
|
|
|
if (!string.IsNullOrEmpty(extra)) Args += $"{extra} ";
|
2021-04-29 05:05:55 -07:00
|
|
|
|
Args += $"\"{file}\"";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|