Skip to content

JGit update to 7.2.1 #4783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opengrok-indexer/pom.xml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
Portions Copyright (c) 2017-2020, Chris Fraire <cfraire@me.com>.
Portions Copyright (c) 2020-2020, Lubos Kosco <tarzanek@gmail.com>.
@@ -237,7 +237,7 @@ Portions Copyright (c) 2020-2020, Lubos Kosco <tarzanek@gmail.com>.
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.6.1.202309021850-r</version>
<version>7.2.1.202505142326-r</version>
</dependency>
<dependency>
<groupId>io.github.g00fy2</groupId>
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -125,22 +126,9 @@ void setUpClass() throws Exception {
env.setAnnotationCacheEnabled(true);

repository = new TestRepository();
repository.create(HistoryGuru.class.getResource("/repositories"));

// After copying the files from the archive, Git will consider the files to be changed,
// at least on Windows. This causes some tests, particularly testGetIndexDownArgs() to fail.
// To avoid this, clone the Git repository.
Path gitRepositoryRootPath = Path.of(repository.getSourceRoot(), "git");
Path gitCheckoutPath = Path.of(repository.getSourceRoot(), "gitcheckout");
Git git = Git.cloneRepository()
.setURI(gitRepositoryRootPath.toFile().toURI().toString())
.setDirectory(gitCheckoutPath.toFile())
.call();
// The Git object has to be closed, otherwise the move below would fail on Windows with
// AccessDeniedException due to the file handle still being open.
git.close();
IOUtils.removeRecursive(gitRepositoryRootPath);
Files.move(gitCheckoutPath, gitRepositoryRootPath);
URL repositoryURL = HistoryGuru.class.getResource("/repositories");
assertNotNull(repositoryURL);
repository.create(repositoryURL);

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