mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-03 01:55:00 +00:00

If we do not provide pulling remote branch, it will auto fetch all branches first. Signed-off-by: leo <longshuang@msn.cn>
18 lines
476 B
C#
18 lines
476 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class Pull : Command
|
|
{
|
|
public Pull(string repo, string remote, string branch, bool useRebase)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
SSHKey = new Config(repo).Get($"remote.{remote}.sshkey");
|
|
Args = "pull --verbose --progress ";
|
|
|
|
if (useRebase)
|
|
Args += "--rebase=true ";
|
|
|
|
Args += $"{remote} {branch}";
|
|
}
|
|
}
|
|
}
|