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

Allow merging when there are remaining unstaged changes #120

Open adam-ce opened 1 year ago

adam-ce commented 1 year ago

Edit from @JetpackDuba

ah, my merge tool (kdiff3) keeps a file_with_conflict.cpp.orig file. after deleting it i the merge button gets enabled. image

i guess this could be a feature to keep the repository clean, but imo it's not intuitive. at least there should be an information why the button is disabled :)

* i tend to keep such files around for a few days until i'm sure everything is ok.

Original:

Describe the bug I pulled and had to merge due to conflicts. After merging with git mergetool (from command line), it happened, that no additional files needed to be staged (because merging resulted in a choosing the local version everywhere). it was not possible to complete the merge in nuro.

To Reproduce Steps to reproduce the behavior:

  1. Create a merge conflict
  2. select local version everywhere
  3. try to commit. the merge/commit button is greyed out

Expected behavior the merge button is active, and completes the merge

Desktop (please complete the following information):

JetpackDuba commented 1 year ago

Hey! Thanks for the report!

After solving the conflicts, did you still have unstaged changes? The button should only be disabled if unstaged changes is not empty.

adam-ce commented 1 year ago

no. that's the point. there are no unstaged changes. so the button is disabled. therefore, i can't finish the merge.

JetpackDuba commented 1 year ago

I've noticed an issue where the button is enabled but it fails saying "No changes", which should be fixed now in commit this commit https://github.com/JetpackDuba/Gitnuro/commit/b2dc0ecc50af6facdc65329c5c30ca55088dbe61 but I can't reproduce the button being disabled.

Steps followed:

Same file changed in both branches (local & remote): imagen

A conflict shows up when pulling: imagen

Conflict is fixed (button is enabled): imagen

At this point, before the previously mentioned commit, it would show an error popup but with that change it works as expected by creating an empty commit: imagen

Am I missing something?

adam-ce commented 1 year ago

ah, my merge tool (kdiff3) keeps a file_with_conflict.cpp.orig file. after deleting it i the merge button gets enabled. image

i guess this could be a feature to keep the repository clean, but imo it's not intuitive. at least there should be an information why the button is disabled :)

JetpackDuba commented 1 year ago

That makes sense. I may add a setting to change this behavior, but not sure yet.

I've edited the title and your first message to reflect properly the issue.