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

Commit 0c3b816

Browse files
Functionality to prune branches
1 parent 977b32e commit 0c3b816

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/GitHub.Api/Git/GitClient.cs

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

276-
return new GitFetchTask(remote, cancellationToken, processor)
276+
return new GitFetchTask(remote, cancellationToken, true, processor)
277277
.Configure(processManager);
278278
}
279279

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

Lines changed: 6 additions & 1 deletion
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, IOutputProcessor<string> processor = null)
13+
CancellationToken token, 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 (prune)
21+
{
22+
stringBuilder.Append(" -p");
23+
}
24+
2025
if (!String.IsNullOrEmpty(remote))
2126
{
2227
stringBuilder.Append(" ");

0 commit comments

Comments
 (0)