forked from sourcegit-scm/sourcegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAdd.cs
More file actions
26 lines (24 loc) · 691 Bytes
/
Copy pathAdd.cs
File metadata and controls
26 lines (24 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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.Quoted()}";
}
public Add(string repo, string pathspecFromFile)
{
WorkingDirectory = repo;
Context = repo;
Args = $"add --pathspec-from-file={pathspecFromFile.Quoted()}";
}
}
}