mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
16 lines
455 B
C#
16 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}\"";
|
||
|
}
|
||
|
}
|
||
|
}
|