Merge pull request #176 from tgstation/Cyberboss-patch-1

Actually make Checkout() fetch from origin first
This commit is contained in:
Jordan Brown
2017-09-17 22:46:41 -04:00
committed by GitHub
+3
View File
@@ -305,6 +305,7 @@ namespace TGServerService
if (Repo.Branches[sha] == null)
{
//see if origin has the branch
result = Fetch();
var trackedBranch = Repo.Branches[String.Format("origin/{0}", sha)];
if (trackedBranch != null)
{
@@ -312,6 +313,8 @@ namespace TGServerService
//track it
Repo.Branches.Update(newBranch, b => b.TrackedBranch = trackedBranch.CanonicalName);
}
else if (result != null)
return result;
}
var Opts = new CheckoutOptions()
{