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))