Bug: Files vanish when deleting current branch in Git plugin
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
調査の方向性
Commit Dock の「Remove Branch」アクションから始め、Git plugin 3.1.1 を使用した Godot 4.3 で、現在のブランチの作成、選択、削除の一連の操作を再現します。削除中にアクティブなブランチがどのように扱われるかを追跡し、その後、UI によって選択中のブランチの削除が防止されること、およびブランチ操作後もファイルを復元できることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Environment where the phenomenon occurred
GodotEngine v4.3.stable.official [77dcf97d8]
Git plugin v3.1.1
Windows10 Home (64bit)
Steps taken and the problem encountered
Using the "Create New Branch" option in the bottom-right menu of the Commit Dock, I created a branch named publish.
The selected branch in the bottom-left of the Commit Dock automatically switched from master to publish.
I committed several files to the publish branch.
Using the "Remove Branch" option in the bottom-right menu of the Commit Dock, I deleted the currently selected publish branch.
Immediately afterward, two error dialogs were displayed, and some of the files I had just committed disappeared.
The first dialog displayed the message: "Cannot open file 'filename.tscn'. The file may have been moved or deleted."
The second dialog displayed the message: "Cannot load due to a missing dependency: filename.gd."
When I closed the dialogs, the editor forcibly closed itself.
Even after restarting the editor, the files remained missing, and errors related to the missing files were displayed.
The deleted files were not found in the recycle bin either.
Workaround
If you select a different branch (e.g., master) and then delete the publish branch, the branch is removed successfully without errors.
Request
Please prevent the deletion of the currently selected branch.
For example, by excluding the currently selected branch from the "Remove Branch" list or by displaying a dialog to interrupt the process.
The Issue is Not File Deletion, but the Ability to Delete the Currently Selected Branch
(Added on 2025/04/23)
When switching branches, it was confirmed that TortoiseGit also deletes files or folders that were tracked in the previous branch (e.g., publish) but not in the branch after switching (e.g., master).
However, these deleted files or folders can be restored by switching back to the original branch (e.g., publish).
master branch
a.txt
publish branch
a.txt
b.txt
File states during branch switching
publish -> master -> publish
a.txt -> a.txt -> a.txt
b.txt -> (deleted) -> b.txt
The main point of this issue is not that files or folders were deleted when the selected branch (e.g., publish) was removed and the remaining branch (e.g., master) was automatically switched to.
Instead, the point is that after the original branch (e.g., publish) was deleted, the files or folders cannot be restored.
File states when the selected branch is deleted, and it is automatically switched to the `master` branch
publish -> master -> publish (deleted)
a.txt -> a.txt -> Cannot switch back.
b.txt -> (deleted) -> Cannot switch back.
Therefore, it would be safer if the list displayed in the "Remove branch" option prevents selecting the currently active branch (e.g., publish).
That is all for my report.
This text was translated from Japanese to English using Windows 10 Copilot.
It was then retranslated back into Japanese with Google Translate to verify its accuracy before posting.
- 主要言語
- C++
- スター
- 966
- フォーク
- 100
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
godotengine/godot-git-plugin のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 47/100
godotengine/godot-git-plugin#338 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
godotengine/godot-git-plugin#337 · コメント 2 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
godotengine/godot-git-plugin#335 ·
-
bug confirmed
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
godotengine/godot-git-plugin#334 · コメント 3 件 ·
-
Edit commit messageオープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
godotengine/godot-git-plugin#332 ·
godotengine/godot-git-plugin の issue をすべて見る
似ている issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/DirectXShaderCompiler#9155 ·
メンテナーはふだん 2 日以内に返信
-
Errors in 1.20 proseオープンCampaign DiD Campaign EI Campaign HttT Campaign TDG Campaign TSG Campaign WoF Enhancement Help Prose Stable 1.20
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wesnoth/wesnoth#11749 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
trabucayre/openFPGALoader#767 ·
メンテナーはふだん 1 日以内に返信
-
agent:Windows bug in progress pri:medium sev:low testing windows
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
protocolbuffers/protobuf#31768 ·
メンテナーはふだん 1 日以内に返信