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 ";
|
2024-03-31 01:54:29 -07:00
|
|
|
|
if (ignoreWhitespace)
|
|
|
|
|
Args += "--ignore-whitespace ";
|
|
|
|
|
else
|
|
|
|
|
Args += $"--whitespace={whitespaceMode} ";
|
|
|
|
|
if (!string.IsNullOrEmpty(extra))
|
|
|
|
|
Args += $"{extra} ";
|
2021-04-29 05:05:55 -07:00
|
|
|
|
Args += $"\"{file}\"";
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
|
}
|