mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 05:56:58 +01:00
Merge pull request #176 from tgstation/Cyberboss-patch-1
Actually make Checkout() fetch from origin first
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user