redhat-developer / redhat-developer/vscode-java
[Feature Request] Execute git mv when class is moved via refactor
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Issue không nêu tên tệp mã nguồn, bài kiểm thử hoặc các điểm vào. Hãy bắt đầu từ tác vụ tái cấu trúc Java và phần tích hợp với extension VS Code của nó, sau đó theo dõi cách các thao tác di chuyển lớp được thực hiện. Công việc được xem là hoàn tất khi việc di chuyển một lớp vẫn bảo toàn lịch sử Git trên thiết lập Windows đã nêu, đồng thời giữ nguyên hành vi tái cấu trúc hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, java, typescript, vscode
- Lĩnh vực
- developer-experience, devtools
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100