sourcegit/src/Commands/Apply.cs

14 lines
518 B
C#
Raw Normal View History

namespace SourceGit.Commands {
2021-04-29 05:05:55 -07:00
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}\"";
}
}
}