Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.GarbageCollectCommand.call()


  protected void runImpl() throws IOException, Failure {
    try {
      GarbageCollectCommand gc = Git.wrap(repo).gc();
      logGcInfo("before:", gc.getStatistics());
      gc.setProgressMonitor(NullProgressMonitor.INSTANCE);
      Properties statistics = gc.call();
      logGcInfo("after: ", statistics);
    } catch (Exception e) {
      throw new Failure(1, "fatal: Cannot run gc: ", e);
    }
  }
View Full Code Here


        if (hasGarbage && (hasEnoughGarbage || shouldCollectGarbage)) {
          long looseKB = sizeOfLooseObjects/1024L;
          logger.info(MessageFormat.format("Collecting {1} KB of loose objects from {0}", repositoryName, looseKB));

          // do the deed
          gc.call();

          garbageCollected = true;
        }
      } catch (Exception e) {
        logger.error("Error collecting garbage in " + repositoryName, e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.