Integrated: GitRepository#revert does not work as intended

Julian Waters jwaters at openjdk.org
Tue Jan 10 15:03:58 UTC 2023


On Sun, 25 Dec 2022 19:49:01 GMT, Julian Waters <jwaters 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 pull request has now been integrated.

Changeset: d5e6e591
Author:    Julian Waters <jwaters at openjdk.org>
Committer: Erik Joelsson <erikj at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/d5e6e591bdde15ecdcd3e5d0391e3713f433e745
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

GitRepository#revert does not work as intended

Reviewed-by: erikj

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

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


More information about the skara-dev mailing list