本文整理了Java中org.eclipse.jgit.lib.Repository.autoGC
方法的一些代码示例,展示了Repository.autoGC
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.autoGC
方法的具体详情如下:
包路径:org.eclipse.jgit.lib.Repository
类名称:Repository
方法名:autoGC
[英]Check whether any housekeeping is required; if yes, run garbage collection; if not, exit without performing any work. Some JGit commands run autoGC after performing operations that could create many loose objects.
Currently this option is supported for repositories of type FileRepository only. See org.eclipse.jgit.internal.storage.file.GC#setAuto(boolean) for configuration details.
[中]检查是否需要进行内务管理;如果是,运行垃圾收集;如果没有,则退出,不执行任何工作。一些JGit命令在执行可能会创建许多松散对象的操作后运行autoGC。
目前,仅FileRepository类型的存储库支持此选项。见org。日食jgit。内部的存储文件GC#setAuto(布尔值)获取配置详细信息。
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
private void autoGc() {
Repository repo = getRepository();
if (!repo.getConfig().getBoolean(ConfigConstants.CONFIG_RECEIVE_SECTION,
ConfigConstants.CONFIG_KEY_AUTOGC, true)) {
return;
}
repo.autoGC(NullProgressMonitor.INSTANCE);
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
new FetchProcess(this, toFetch).execute(monitor, result);
local.autoGC(monitor);
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
private RebaseResult finishRebase(RevCommit finalHead,
boolean lastStepIsForward) throws IOException, GitAPIException {
String headName = rebaseState.readFile(HEAD_NAME);
updateHead(headName, finalHead, upstreamCommit);
boolean stashConflicts = autoStashApply();
getRepository().autoGC(monitor);
FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE);
if (stashConflicts)
return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;
if (lastStepIsForward || finalHead == null)
return RebaseResult.FAST_FORWARD_RESULT;
return RebaseResult.OK_RESULT;
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
getRepository().autoGC(monitor);
代码示例来源:origin: berlam/github-bucket
private void autoGc() {
Repository repo = getRepository();
if (!repo.getConfig().getBoolean(ConfigConstants.CONFIG_RECEIVE_SECTION,
ConfigConstants.CONFIG_KEY_AUTOGC, true)) {
return;
}
repo.autoGC(NullProgressMonitor.INSTANCE);
}
代码示例来源:origin: berlam/github-bucket
new FetchProcess(this, toFetch).execute(monitor, result);
local.autoGC(monitor);
代码示例来源:origin: berlam/github-bucket
private RebaseResult finishRebase(RevCommit finalHead,
boolean lastStepIsForward) throws IOException, GitAPIException {
String headName = rebaseState.readFile(HEAD_NAME);
updateHead(headName, finalHead, upstreamCommit);
boolean stashConflicts = autoStashApply();
getRepository().autoGC(monitor);
FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE);
if (stashConflicts)
return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;
if (lastStepIsForward || finalHead == null)
return RebaseResult.FAST_FORWARD_RESULT;
return RebaseResult.OK_RESULT;
}
代码示例来源:origin: berlam/github-bucket
getRepository().autoGC(monitor);
内容来源于网络,如有侵权,请联系作者删除!