Skip to content

Commit e36d88e

Browse files
authored
JGit update to 7.2.1 (#4783)
1 parent 4e8e3ec commit e36d88e

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

opengrok-indexer/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ information: Portions Copyright [yyyy] [name of copyright owner]
1818
1919
CDDL HEADER END
2020
21-
Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
21+
Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
2222
Portions Copyright (c) 2017-2020, Chris Fraire <[email protected]>.
2323
Portions Copyright (c) 2020-2020, Lubos Kosco <[email protected]>.
2424
@@ -237,7 +237,7 @@ Portions Copyright (c) 2020-2020, Lubos Kosco <[email protected]>.
237237
<dependency>
238238
<groupId>org.eclipse.jgit</groupId>
239239
<artifactId>org.eclipse.jgit</artifactId>
240-
<version>6.6.1.202309021850-r</version>
240+
<version>7.2.1.202505142326-r</version>
241241
</dependency>
242242
<dependency>
243243
<groupId>io.github.g00fy2</groupId>

opengrok-indexer/src/test/java/org/opengrok/indexer/index/IndexDatabaseTest.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.io.FileOutputStream;
2828
import java.io.FileWriter;
2929
import java.io.IOException;
30+
import java.net.URL;
3031
import java.nio.charset.StandardCharsets;
3132
import java.nio.file.Files;
3233
import java.nio.file.Path;
@@ -125,22 +126,9 @@ void setUpClass() throws Exception {
125126
env.setAnnotationCacheEnabled(true);
126127

127128
repository = new TestRepository();
128-
repository.create(HistoryGuru.class.getResource("/repositories"));
129-
130-
// After copying the files from the archive, Git will consider the files to be changed,
131-
// at least on Windows. This causes some tests, particularly testGetIndexDownArgs() to fail.
132-
// To avoid this, clone the Git repository.
133-
Path gitRepositoryRootPath = Path.of(repository.getSourceRoot(), "git");
134-
Path gitCheckoutPath = Path.of(repository.getSourceRoot(), "gitcheckout");
135-
Git git = Git.cloneRepository()
136-
.setURI(gitRepositoryRootPath.toFile().toURI().toString())
137-
.setDirectory(gitCheckoutPath.toFile())
138-
.call();
139-
// The Git object has to be closed, otherwise the move below would fail on Windows with
140-
// AccessDeniedException due to the file handle still being open.
141-
git.close();
142-
IOUtils.removeRecursive(gitRepositoryRootPath);
143-
Files.move(gitCheckoutPath, gitRepositoryRootPath);
129+
URL repositoryURL = HistoryGuru.class.getResource("/repositories");
130+
assertNotNull(repositoryURL);
131+
repository.create(repositoryURL);
144132

145133
env.setSourceRoot(repository.getSourceRoot());
146134
env.setDataRoot(repository.getDataRoot());

0 commit comments

Comments
 (0)