2024-03-17 18:37:06 -07:00
|
|
|
|
namespace SourceGit.Commands
|
|
|
|
|
{
|
|
|
|
|
public class Apply : Command
|
|
|
|
|
{
|
|
|
|
|
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}\"";
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-03-17 18:37:06 -07:00
|
|
|
|
}
|