mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 19:02:39 +08:00
27 lines
681 B
C#
27 lines
681 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class Add : Command
|
|
{
|
|
public Add(string repo, bool includeUntracked)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = includeUntracked ? "add ." : "add -u .";
|
|
}
|
|
|
|
public Add(string repo, Models.Change change)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = $"add -- \"{change.Path}\"";
|
|
}
|
|
|
|
public Add(string repo, string pathspecFromFile)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = $"add --pathspec-from-file=\"{pathspecFromFile}\"";
|
|
}
|
|
}
|
|
}
|