diff options
author | Thomas Wolf <twolf@apache.org> | 2025-07-19 14:10:19 +0200 |
---|---|---|
committer | Thomas Wolf <twolf@apache.org> | 2025-07-19 14:11:13 +0200 |
commit | 918fdd77409af70942ae38f521e6597ef7bc4f61 (patch) | |
tree | c401d3354dc023ef3e8eacd95c5ba5f9bade6306 /org.eclipse.jgit.http.test/.settings | |
parent | ee5eb8eee28dd1eec1916760a0ba3432bd306b70 (diff) | |
download | jgit-master.tar.gz jgit-master.zip |
IndexDiffWithSymlinkTest runs only on MacOS, but fails there with newer
git or when run on a JVM 21.
Newer git creates a default branch "main" by default. The test uses
native git to run "git fast-import" to be sure the symlink to be tested
is created not through Java but natively. But the so imported repo
assumes "master" as default branch, and thus the final checkout fails.
Fix this by running "git -c init.defaultBranch=master init" instead of
just "git init". (With older git that doesn't know this config, this -c
option simply won't have any effect, but such old git will use "master"
anyway as default branch name.)
Next, that test tries to reflectively access a package-private method in
sun.nio.fs.UnixPath to get at the raw bytes of that symlink. That fails
with an InaccessibleObjectException on JVM 21. Fix this by adding
"--add-opens java.base/sun.nio.fs=ALL-UNNAMED" to the surefire command
line options.
Change-Id: I6316be2e5cc5d58e7c4e30fcdca274dfa8abc78d
Diffstat (limited to 'org.eclipse.jgit.http.test/.settings')
0 files changed, 0 insertions, 0 deletions