RFR: GitRepository#revert does not work as intended

Julian Waters jwaters at openjdk.org
Tue Jan 10 01:09:21 UTC 2023


On Tue, 3 Jan 2023 14:20:47 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> The `Repository#revert` interface is meant to allow for rolling the Repository back to a specific commit, but the Git implementation in `GitRepository#revert` implements this via a checkout, which can cause issues, especially with newer versions of Git where it doesn't have any effect at all. More appropriate would be using `git restore --source` to implement the GitRepository variant instead, which is actually the encouraged way to do so nowadays
>
> This looks correct. It doesn't seem like we are using this call anywhere currently for git repos, so this change shouldn't affect any current functionality.

@erikj79 Could I trouble you for a sponsor? Sorry for the trouble!

-------------

PR: https://git.openjdk.org/skara/pull/1450


More information about the skara-dev mailing list