mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 00:50:45 +01:00
Removes ITGServerUpdater
This commit is contained in:
@@ -671,7 +671,30 @@ namespace TGServerService
|
||||
}
|
||||
}
|
||||
|
||||
//public api
|
||||
public string PushChangelog()
|
||||
{
|
||||
return LocalIsRemote() ? Commit() ?? Push() : "Can't push changelog: HEAD does not match tracked remote branch";
|
||||
}
|
||||
|
||||
bool LocalIsRemote()
|
||||
{
|
||||
lock (RepoLock)
|
||||
{
|
||||
if (LoadRepo() != null)
|
||||
return false;
|
||||
var R = Repo.Network.Remotes["origin"];
|
||||
try
|
||||
{
|
||||
Commands.Fetch(Repo, R.Name, R.FetchRefSpecs.Select(X => X.Specification), null, null);
|
||||
return Repo.Head.IsTracking && Repo.Head.TrackedBranch.Tip.Sha == Repo.Head.Tip.Sha;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string Commit()
|
||||
{
|
||||
lock (RepoLock)
|
||||
|
||||
Reference in New Issue
Block a user