Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Git.gc()


        }

        logger.debug(MessageFormat.format("GCExecutor locked idle repository {0}", repositoryName));

        Git git = new Git(repository);
        GarbageCollectCommand gc = git.gc();
        Properties stats = gc.getStatistics();

        // determine if this is a scheduled GC
        Calendar cal = Calendar.getInstance();
        cal.setTime(model.lastGC);
View Full Code Here


  private boolean aggressive;

  @Override
  protected void run() throws Exception {
    Git git = Git.wrap(db);
    git.gc().setAggressive(aggressive)
        .setProgressMonitor(new TextProgressMonitor()).call();
  }
}
View Full Code Here

    Repository repo = (Repository) getElement()
        .getAdapter(Repository.class);
    if (repo == null)
      return table;
    Git git = new Git(repo);
    GarbageCollectCommand gc = git.gc();
    try {
      Properties stats = gc.getStatistics();

      table.setLinesVisible(true);
      table.setHeaderVisible(true);
View Full Code Here

  public void execute(IProgressMonitor monitor) throws CoreException {
    Git git = new Git(repository);
    EclipseGitProgressTransformer pm = new EclipseGitProgressTransformer(
        monitor);
    try {
      git.gc().setProgressMonitor(pm).call();
    } catch (GitAPIException e) {
      throw new CoreException(new Status(IStatus.ERROR,
          Activator.getPluginId(), e.getMessage(), 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.