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

Commit 9de0b16

Browse files
Merge branch 'master' into more-serialization-magic
2 parents ee47295 + d823376 commit 9de0b16

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
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, processor: processor)
280280
.Configure(processManager);
281281
}
282282

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System;
2-
using System.Text;
2+
using System.Collections.Generic;
33
using System.Threading;
44

55
namespace GitHub.Unity
@@ -10,28 +10,31 @@ 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 prune = true, bool tags = true, IOutputProcessor<string> processor = null)
1414
: base(token, processor ?? new SimpleOutputProcessor())
1515
{
1616
Name = TaskName;
17-
var stringBuilder = new StringBuilder();
18-
stringBuilder.Append("fetch");
19-
17+
var args = new List<string> { "fetch" };
18+
2019
if (prune)
2120
{
22-
stringBuilder.Append(" -p");
21+
args.Add("--prune");
22+
}
23+
24+
if (tags)
25+
{
26+
args.Add("--tags");
2327
}
2428

2529
if (!String.IsNullOrEmpty(remote))
2630
{
27-
stringBuilder.Append(" ");
28-
stringBuilder.Append(remote);
31+
args.Add(remote);
2932
}
3033

31-
arguments = stringBuilder.ToString();
34+
arguments = args.Join(" ");
3235
}
3336

3437
public override string ProcessArguments { get { return arguments; } }
3538
public override TaskAffinity Affinity { get { return TaskAffinity.Exclusive; } }
3639
}
37-
}
40+
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/SettingsView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private void OnGitLfsLocksGUI()
292292
GUILayout.FlexibleSpace();
293293
if (GUILayout.Button("Unlock"))
294294
{
295-
Repository.ReleaseLock(lck.Path, false).Start();
295+
Repository.ReleaseLock(lck.Path, true).Start();
296296
}
297297
}
298298
GUILayout.EndHorizontal();

0 commit comments

Comments
 (0)