JetpackDuba / Gitnuro

A FOSS Git multiplatform client for newbies and pros
https://gitnuro.com/
GNU General Public License v3.0
946 stars 46 forks source link

crash on merge conflicts of git submodules #118

Closed adam-ce closed 1 year ago

adam-ce commented 1 year ago

Describe the bug git nuro crashes when merging a branch with a conflicting git submodule

To Reproduce Steps to reproduce the behavior:

  1. clone a repo with submodules
  2. create a branch in the main repository
  3. checkout a different branch/tag/commit of the submodule
  4. commit the change
  5. checkout the main branch again
  6. checkout a different branch/tag/commit of the submodule
  7. merge with the branch
  8. obviously, there is a conflict in the submodule. gitnuro crashes.

Expected behavior it should be possible to resolve the merge conflict, or at least it should not crash.

Desktop:

JetpackDuba commented 1 year ago

Hey! Thanks for your report!

It seems to be an issue with the list of uncommited changes, when there is a conflict the status command returns the same file name twice but with a different state (not sure why), crashing then because of having multiple files with the same key.

I've got a partial solution but I want to look into it in more detail.