50
50
import org .junit .jupiter .api .Test ;
51
51
import org .junit .jupiter .params .ParameterizedTest ;
52
52
import org .junit .jupiter .params .provider .ValueSource ;
53
- import org .opengrok .indexer .condition .EnabledForRepository ;
54
53
import org .opengrok .indexer .configuration .CommandTimeoutType ;
55
54
import org .opengrok .indexer .configuration .RuntimeEnvironment ;
56
55
import org .opengrok .indexer .util .FileUtilities ;
63
62
import static org .junit .jupiter .api .Assertions .assertNull ;
64
63
import static org .junit .jupiter .api .Assertions .assertThrows ;
65
64
import static org .junit .jupiter .api .Assertions .assertTrue ;
66
- import static org .opengrok .indexer .condition .RepositoryInstalled .Type .GIT ;
67
65
68
66
/**
69
67
* @author austvik
70
68
*/
71
- @ EnabledForRepository (GIT )
72
69
public class GitRepositoryTest {
73
70
74
71
private static TestRepository repository = new TestRepository ();
@@ -368,8 +365,7 @@ public void testAnnotationOfRenamedFileWithHandlingOff() throws Exception {
368
365
Collections .addAll (revSet , revisions );
369
366
370
367
File root = new File (repository .getSourceRoot (), "git" );
371
- GitRepository gitrepo
372
- = (GitRepository ) RepositoryFactory .getRepository (root );
368
+ GitRepository gitrepo = (GitRepository ) RepositoryFactory .getRepository (root );
373
369
gitrepo .setHandleRenamedFiles (false );
374
370
File renamedFile = Paths .get (root .getAbsolutePath (), "moved2" , "renamed2.c" ).toFile ();
375
371
testAnnotationOfFile (gitrepo , renamedFile , null , revSet );
@@ -382,8 +378,7 @@ public void testAnnotationOfRenamedFileWithHandlingOn() throws Exception {
382
378
Collections .addAll (revSet , revisions );
383
379
384
380
File root = new File (repository .getSourceRoot (), "git" );
385
- GitRepository gitrepo
386
- = (GitRepository ) RepositoryFactory .getRepository (root );
381
+ GitRepository gitrepo = (GitRepository ) RepositoryFactory .getRepository (root );
387
382
gitrepo .setHandleRenamedFiles (true );
388
383
File renamedFile = Paths .get (root .getAbsolutePath (), "moved2" , "renamed2.c" ).toFile ();
389
384
testAnnotationOfFile (gitrepo , renamedFile , null , revSet );
@@ -396,8 +391,7 @@ public void testAnnotationOfRenamedFilePastWithHandlingOn() throws Exception {
396
391
Collections .addAll (revSet , revisions );
397
392
398
393
File root = new File (repository .getSourceRoot (), "git" );
399
- GitRepository gitrepo
400
- = (GitRepository ) RepositoryFactory .getRepository (root );
394
+ GitRepository gitrepo = (GitRepository ) RepositoryFactory .getRepository (root );
401
395
gitrepo .setHandleRenamedFiles (true );
402
396
File renamedFile = Paths .get (root .getAbsolutePath (), "moved2" , "renamed2.c" ).toFile ();
403
397
testAnnotationOfFile (gitrepo , renamedFile , "1086eaf5" , revSet );
@@ -526,8 +520,7 @@ public void testGetHistoryForNonExistentRenamed() throws Exception {
526
520
527
521
private void runRenamedTest (String fname , String cset , String content ) throws Exception {
528
522
File root = new File (repository .getSourceRoot (), "git" );
529
- GitRepository gitrepo
530
- = (GitRepository ) RepositoryFactory .getRepository (root );
523
+ GitRepository gitrepo = (GitRepository ) RepositoryFactory .getRepository (root );
531
524
byte [] buffer = new byte [4096 ];
532
525
533
526
InputStream input = gitrepo .getHistoryGet (root .getCanonicalPath (),
0 commit comments