From 4a865e94316558b770eaf66ade625e8d0f74dfa8 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Tue, 3 Oct 2017 14:52:49 -0400 Subject: [PATCH] Disables automatic garbage collection on the repository --- TGServerService/Repository.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TGServerService/Repository.cs b/TGServerService/Repository.cs index 460e8050b4..ae2e62afb8 100644 --- a/TGServerService/Repository.cs +++ b/TGServerService/Repository.cs @@ -141,6 +141,8 @@ namespace TGServerService { if(Exists()) UpdateInterfaceDll(false); + if(LoadRepo() == null) + DisableGarbageCollectionNoLock(); } bool RepoConfigsMatch() @@ -265,6 +267,8 @@ namespace TGServerService currentProgress = -1; LoadRepo(); + DisableGarbageCollectionNoLock(); + //create an ssh remote for pushing Repo.Network.Remotes.Add(SSHPushRemote, RepoURL.Replace("git://", "ssh://").Replace("https://", "ssh://")); @@ -294,6 +298,11 @@ namespace TGServerService } } + void DisableGarbageCollectionNoLock() + { + Repo.Config.Set("gc.auto", false); + } + void BackupAndDeleteStaticDirectory() { if (Directory.Exists(StaticDirs))