TW-14734 enable native git gc by default
authorDmitry Neverov <dmitry.neverov@gmail.com>
Mon, 19 Jun 2017 15:28:57 +0000 (17:28 +0200)
committerDmitry Neverov <dmitry.neverov@gmail.com>
Mon, 19 Jun 2017 15:30:29 +0000 (17:30 +0200)
git-server/src/jetbrains/buildServer/buildTriggers/vcs/git/Cleanup.java
git-server/src/jetbrains/buildServer/buildTriggers/vcs/git/PluginConfigImpl.java

index e1e7d5f8b36466c5142f6296592fcc5d6fa008f0..f23d3ff27df4e36263ba84cd11df529b3282407e 100644 (file)
@@ -73,10 +73,10 @@ public class Cleanup {
       LOG.info("Git cleanup started");
       removeUnusedRepositories();
       cleanupMonitoringData();
-      if (myConfig.isRunJGitGC()) {
-        runJGitGC();
-      } else if (myConfig.isRunNativeGC()) {
+      if (myConfig.isRunNativeGC()) {
         runNativeGC();
+      } else if (myConfig.isRunJGitGC()) {
+        runJGitGC();
       }
       LOG.info("Git cleanup finished");
     } finally {
index bfb38dfb88a524f1d2c421d08c0cadc791516bc2..b9d96e5a084ab0b509855788aeb536e4e117a4c2 100644 (file)
@@ -186,7 +186,7 @@ public class PluginConfigImpl implements ServerPluginConfig {
   }
 
   public boolean isRunNativeGC() {
-    return TeamCityProperties.getBoolean("teamcity.server.git.gc.enabled");
+    return TeamCityProperties.getBooleanOrTrue("teamcity.server.git.gc.enabled");
   }
 
   public boolean isRunJGitGC() {