Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 9abcd25

Browse files
committed
Added option to fetch all
1 parent 8049cb2 commit 9abcd25

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/GitHub.Api/Git/GitClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public ITask<string> Fetch(string remote,
276276
{
277277
//Logger.Trace("Fetch");
278278

279-
return new GitFetchTask(remote, cancellationToken, true, processor)
279+
return new GitFetchTask(remote, cancellationToken, true, true, processor)
280280
.Configure(processManager);
281281
}
282282

src/GitHub.Api/Git/Tasks/GitFetchTask.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@ class GitFetchTask : ProcessTask<string>
1010
private readonly string arguments;
1111

1212
public GitFetchTask(string remote,
13-
CancellationToken token, bool prune = false, IOutputProcessor<string> processor = null)
13+
CancellationToken token, bool all = false, bool prune = false, IOutputProcessor<string> processor = null)
1414
: base(token, processor ?? new SimpleOutputProcessor())
1515
{
1616
Name = TaskName;
1717
var stringBuilder = new StringBuilder();
1818
stringBuilder.Append("fetch");
1919

20+
if (all)
21+
{
22+
stringBuilder.Append(" --all");
23+
}
24+
2025
if (prune)
2126
{
2227
stringBuilder.Append(" -p");
@@ -34,4 +39,4 @@ public GitFetchTask(string remote,
3439
public override string ProcessArguments { get { return arguments; } }
3540
public override TaskAffinity Affinity { get { return TaskAffinity.Exclusive; } }
3641
}
37-
}
42+
}

0 commit comments

Comments
 (0)