sourcegit/src/Commands/Apply.cs

16 lines
455 B
C#
Raw Normal View History

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