sourcegit/src/Commands/Apply.cs

20 lines
578 B
C#
Raw Normal View History

namespace SourceGit.Commands
{
public class Apply : Command
{
public Apply(string repo, string file, bool ignoreWhitespace, string whitespaceMode, string extra)
{
WorkingDirectory = repo;
Context = repo;
2021-04-29 05:05:55 -07:00
Args = "apply ";
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}\"";
}
}
}