sourcegit/src/Commands/Apply.cs
2021-04-29 20:05:55 +08:00

15 lines
455 B
C#

namespace SourceGit.Commands {
/// <summary>
/// 应用Patch
/// </summary>
public class Apply : Command {
public Apply(string repo, string file, bool ignoreWhitespace, string whitespaceMode) {
Cwd = repo;
Args = "apply ";
if (ignoreWhitespace) Args += "--ignore-whitespace ";
else Args += $"--whitespace={whitespaceMode} ";
Args += $"\"{file}\"";
}
}
}