sbt-git icon indicating copy to clipboard operation
sbt-git copied to clipboard

Update JGit to version 7

Open caenrique opened this issue 1 year ago • 2 comments

Hi, would it be possible to update jgit to version 7?

it supports working with git worktrees, which the current version used here doesn't https://projects.eclipse.org/projects/technology.jgit/releases/7.0.0

caenrique avatar Oct 17 '24 13:10 caenrique

Please see my comment:

  • https://github.com/sbt/sbt-git/pull/243#issuecomment-2397762074

jgit 7 requires Java 17, and I don't expect that sbt-git at the moment still supports Java 8... Next step will be dropping Java 8 first, so sbt-git can upgrade to jgit 6:

  • #213

I expect that until sbt-git drops Java 11 and can therefore upgrade to jgit 7 many years will pass... Meanwhile, you can just upgrade to jgit 7 yourself, if your projects only requires Java 17+. Look how we in Play are planning to do just that:

  • https://github.com/playframework/playframework/pull/12910

Be aware however, if #243 gets merged as-is currently, you probaby want to set

ThisBuild / com.github.sbt.git.SbtGit.GitKeys.useConsoleForROGit := false

in your build.sbt. That's because right now #243 does not check if you have jgit 7 on the classpath and will still fallback to the command line git command even if you have jgit 7 on the classpath. I came up with an idea on how to resolve this in this comment, so if this can be figured out, setting useConsoleForROGit := false will not be even necessary. So I suggest you to follow #243 for updates.

mkurz avatar Oct 17 '24 13:10 mkurz

Thank you, that's really useful. I'll read up on those links :)

It really is a bit sad that things are like this for something as ubiquitous as git support.

caenrique avatar Oct 17 '24 14:10 caenrique