mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
19 lines
578 B
C#
19 lines
578 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class Apply : Command
|
|
{
|
|
public Apply(string repo, string file, bool ignoreWhitespace, string whitespaceMode, string extra)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = "apply ";
|
|
if (ignoreWhitespace)
|
|
Args += "--ignore-whitespace ";
|
|
else
|
|
Args += $"--whitespace={whitespaceMode} ";
|
|
if (!string.IsNullOrEmpty(extra))
|
|
Args += $"{extra} ";
|
|
Args += $"\"{file}\"";
|
|
}
|
|
}
|
|
}
|