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

[Feature Request] Execute git mv when class is moved via refactor #2848

Open
Kas-tle opened this issue Dec 28, 2022 · 0 comments
Open

[Feature Request] Execute git mv when class is moved via refactor #2848

Kas-tle opened this issue Dec 28, 2022 · 0 comments

Comments

@Kas-tle
Copy link

Kas-tle commented Dec 28, 2022

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
  1. Initiate refactoring of a Java class
  2. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants