fork-dev / TrackerWin

Bug and issue tracker for Fork for Windows
450 stars 10 forks source link

[Feature] Force Discard submodule changes button #2241

Closed sokhryakov-d closed 3 days ago

sokhryakov-d commented 1 week ago

Discard submodule changes not working in some cases.

image

I would like to suggest making a button that would strictly perform cleaning. The functionality should work recursively for all submodules

DanPristupov commented 1 week ago

Can you describe steps to reproduce the problem, please?

sokhryakov-d commented 1 week ago

Case1: automatic update submodules enabled image Checkout master 2, where submodule has hash XXXX. Add new files in submodule. Just only add files. then checkout master, where submodule has hash YYYY. . Try discard changes in submodules. discard not working

sokhryakov-d commented 1 week ago

I don't understand how to reproduce case 1 with Git Error. If press 'discard' twice, everything works.

sokhryakov-d commented 3 days ago

I found that the problems are due to git worktree. submodules do not work well with worktree. I don't think it's a client problem, it's a Git problem.