Search in sources :

Example 1 with PackInserter

use of org.eclipse.jgit.internal.storage.file.PackInserter in project gerrit by GerritCodeReview.

the class CommitRewriter method newPackInserter.

private static ObjectInserter newPackInserter(Repository repo) {
    if (!(repo instanceof FileRepository)) {
        return repo.newObjectInserter();
    }
    PackInserter ins = ((FileRepository) repo).getObjectDatabase().newPackInserter();
    ins.checkExisting(false);
    return ins;
}
Also used : FileRepository(org.eclipse.jgit.internal.storage.file.FileRepository) PackInserter(org.eclipse.jgit.internal.storage.file.PackInserter)

Aggregations

FileRepository (org.eclipse.jgit.internal.storage.file.FileRepository)1 PackInserter (org.eclipse.jgit.internal.storage.file.PackInserter)1