redhat-developer / redhat-developer/vscode-java
[Feature Request] Execute git mv when class is moved via refactor
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
Issue 中没有指定源文件、测试或入口点。请从 Java 重构操作及其与 VS Code 扩展的集成开始,然后跟踪类移动是如何执行的。完成的标准是在所述 Windows 设置上移动类能够保留 Git 历史,同时保持现有的重构行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, java, typescript, vscode
- 领域
- developer-experience, devtools
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100