View Javadoc
1   /*
2    * Copyright (C) 2020, Google LLC and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.revwalk;
11  
12  import org.eclipse.jgit.internal.storage.file.FileRepository;
13  import org.eclipse.jgit.internal.storage.file.GC;
14  import org.eclipse.jgit.junit.TestRepository;
15  
16  public class BitmappedObjectReachabilityTest
17  	extends ObjectReachabilityTestCase {
18  
19  	@Override
20  	ObjectReachabilityChecker getChecker(
21  			TestRepository<FileRepository> repository) throws Exception {
22  		// GC generates the bitmaps
23  		GC gc = new GC(repository.getRepository());
24  		gc.setAuto(false);
25  		gc.gc();
26  
27  		return new BitmappedObjectReachabilityChecker(
28  				repository.getRevWalk().toObjectWalkWithSameObjects());
29  	}
30  
31  }