Skip to content
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

Replace JGit Repository.getRef() with Repository.findRef() #140

Closed
wants to merge 1 commit into from
Closed

Replace JGit Repository.getRef() with Repository.findRef() #140

wants to merge 1 commit into from

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Dec 28, 2018

JGit 5.0 (or earlier) deprecated the Repository.getRef(String) method and replaced it with two methods, Repository.findRef(String) and Repository.exactRef(String).

JGit 5.2 removed the deprecated method.

Git client plugin 3.0 will bundle JGit 5.2 or later. Rather than risk runtime and compilation failures when using git client plugin 3.0 and later, switch from the deprecated methods to the new methods.

Without this change, this plugin will be broken with the release of git client plugin 3.0.

JGit 5.0 (or earlier) deprecated the Repository.getRef(String)
method and replaced it with two methods, Repository.findRef(String)
and Repository.exactRef(String).

JGit 5.2 removed the deprecated method.

Git client plugin 3.0 will bundle JGit 5.2 or later.  Rather than risk
compilation failures when using git client plugin 3.0 and later, switch
from the deprecated methods to the new methods.
@MarkEWaite
Copy link
Contributor Author

You may also want to push the source code of the latest release to the jenkinsci repository, since it seems to be one release behind the authoritative repository.

@MarkEWaite
Copy link
Contributor Author

I assume someone has already adapted this change into the official repository. Whether they have or not, the release of git client plugin 3.0.0 in the next 1-2 weeks will break the plugin if it has not been updated to include this change.

@MarkEWaite MarkEWaite closed this Oct 28, 2019
@MarkEWaite MarkEWaite deleted the prepare-for-jgit-5.2 branch October 28, 2019 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant