Open
Description
Currently when refactoring a class in a git repo, the refactoring action provided by the Java language server simply creates a new class file and deletes the old one. The git mv
command requires the file being moved to exist not only in the change history, but also within the repo itself. This means that if one would like to execute git mv
to preserve the commit history of the file, they must initiate the refactor, manually move the file back to its original location, prompt the language server to skip refactoring for this second move, and finally execute git mv
to have change history be preserved.
Environment
- Operating System: Windows 11
- JDK version: 17
- Visual Studio Code version: 1.74.2
- Java extension version: 1.13.0
Steps To Reproduce
- Initiate refactoring of a Java class
- Observe the class is moved, but the git history is not preserved
Current Result
Git history is not preserved
Expected Result
Git history is preserved