Merge pull request #230 from Cyberboss/DisableGC

Disables automatic garbage collection on the repository
This commit is contained in:
Jordan Brown
2017-10-03 16:14:25 -04:00
committed by GitHub
+9
View File
@@ -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))