InCoreMerger(ObjectInserter inserter) { super(inserter); tw = new NameConflictTreeWalk(null, reader); cache = DirCache.newInCore(); }
/** * Create an empty reference tree. * * @return a new empty reference tree. */ public static RefTree newEmptyTree() { return new RefTree(DirCache.newInCore()); }
InCoreMerger(Repository local) { super(local); tw = new NameConflictTreeWalk(local, reader); cache = DirCache.newInCore(); }
private DirCache newDirCache() throws IOException { if (commit != null) { return DirCache.read(reader, commit.getTree()); } return DirCache.newInCore(); }
/** * Constructor for ResolveMerger. * * @param inserter * an {@link org.eclipse.jgit.lib.ObjectInserter} object. * @param config * the repository configuration * @since 4.8 */ protected ResolveMerger(ObjectInserter inserter, Config config) { super(inserter); mergeAlgorithm = getMergeAlgorithm(config); commitNames = defaultCommitNames(); inCore = true; implicitDirCache = false; dircache = DirCache.newInCore(); }
/** * Create a new in memory index read from the contents of a tree. * * @param reader * reader to access the tree objects from a repository. * @param treeId * tree to read. Must identify a tree, not a tree-ish. * @return a new cache which has no backing store file, but contains the * contents of {@code treeId}. * @throws java.io.IOException * one or more trees not available from the ObjectReader. * @since 4.2 */ public static DirCache read(ObjectReader reader, AnyObjectId treeId) throws IOException { DirCache d = newInCore(); DirCacheBuilder b = d.builder(); b.addTree(null, DirCacheEntry.STAGE_0, reader, treeId); b.finish(); return d; }
/** * Create a deep copy of this RefTree. * * @return a deep copy of this RefTree. */ public RefTree copy() { RefTree r = new RefTree(DirCache.newInCore()); DirCacheBuilder b = r.contents.builder(); for (int i = 0; i < contents.getEntryCount(); i++) { b.add(new DirCacheEntry(contents.getEntry(i))); } b.finish(); if (pendingBlobs != null) { r.pendingBlobs = new HashMap<>(pendingBlobs); } return r; }
/** * Constructor for ResolveMerger. * * @param local * the {@link org.eclipse.jgit.lib.Repository}. * @param inCore * a boolean. */ protected ResolveMerger(Repository local, boolean inCore) { super(local); Config config = local.getConfig(); mergeAlgorithm = getMergeAlgorithm(config); inCoreLimit = getInCoreLimit(config); commitNames = defaultCommitNames(); this.inCore = inCore; if (inCore) { implicitDirCache = false; dircache = DirCache.newInCore(); } else { implicitDirCache = true; workingTreeOptions = local.getConfig().get(WorkingTreeOptions.KEY); } }
@Nonnull public static DirCache forRevision(AnyObjectId revision, ObjectReader reader) throws IOException { DirCache cache = DirCache.newInCore(); loadRevision(revision, cache, reader); return cache; }
@Nonnull public static DirCache forTree(AnyObjectId treeId, ObjectReader reader) throws IOException { DirCache cache = DirCache.newInCore(); loadTree(treeId, cache, reader); return cache; }
InCoreMerger(Repository local) { super(local); tw = new NameConflictTreeWalk(local, reader); cache = DirCache.newInCore(); }
/** * Create an empty reference tree. * * @return a new empty reference tree. */ public static RefTree newEmptyTree() { return new RefTree(DirCache.newInCore()); }
InCoreMerger(final Repository local) { super(local); tw = new NameConflictTreeWalk(local, reader); cache = DirCache.newInCore(); }
@Nonnull public static DirCache forTree(@Nonnull AnyObjectId treeId, @Nonnull ObjectReader reader) throws IOException { DirCache cache = DirCache.newInCore(); loadTree(treeId, cache, reader); return cache; }
@Nonnull public static DirCache forTree(AnyObjectId treeId, ObjectReader reader) throws IOException { DirCache cache = DirCache.newInCore(); loadTree(treeId, cache, reader); return cache; }
List<RepoProject> renamedProjects = renameProjects(filteredProjects); DirCache index = DirCache.newInCore(); DirCacheBuilder builder = index.builder(); ObjectInserter inserter = repo.newObjectInserter();
DirCache untrackedDirCache = DirCache.newInCore(); DirCacheBuilder untrackedBuilder = untrackedDirCache .builder();
private DirCache newDirCache() throws IOException { if (commit != null) { return DirCache.read(reader, commit.getTree()); } return DirCache.newInCore(); }
private DirCache newDirCache() throws IOException { if (commit != null) { return DirCache.read(reader, commit.getTree()); } return DirCache.newInCore(); }
DirCache inCoreIndex = DirCache.newInCore(); DirCacheBuilder tempBuilder = inCoreIndex.builder();