List of usage examples for org.eclipse.jgit.internal.storage.file GC packRefs
public void packRefs() throws IOException
From source file:org.eclipse.orion.server.git.jobs.GitJobUtils.java
License:Open Source License
/** * Calls pack refs for a given repository * /*from w ww .jav a 2 s. c o m*/ * @param Repository * the git repository */ public static void packRefs(Repository repo, ProgressMonitor monitor) { if (repo != null && repo instanceof FileRepository) { GC gc = new GC(((FileRepository) repo)); gc.setProgressMonitor(monitor); try { gc.packRefs(); } catch (IOException ex) { // ignore IOException since packing is an optimization (not essential for the callers doClone/doFetch) } } }