Community
Participate
Working Groups
Repro: 1. local branch contains modified file 'file1' 2. merge master branch - master branch contains deleted 'file1' (this is the latest and wanted change - file1 actually should be deleted) 3. 'file1' is shown as conflicted in unstaged file list in git staging view 4. righ click 'file1' -> merge tool result: empty merge window is displayed expected: some kind of notification that "local file exists, but 'they' deleted it" and a way for me to choose if I want to keep or delete the file. Note: If I drag 'file1' to staged file area, then file will not be deleted but my copy will be preserved and I will overwrite deleted file change and put the delete file back which is not what I want. Generally I do not know how to see what kind of conflict I have in egit for specific file.
Using egit 2.2, eclipse platform 3.8.1 (sts 3.1.0)
Any update on this? The only solution I found is to: * Use the command line with "git rm" * Then refresh in egit and continue
Created attachment 269999 [details] repo in merge conflict - local delete vs remote modify 4.8.0.201706111038-r Bug still present. Also symmetric case ( local delete vs remote modified ) cannot be solved by deletion. The UI for "replace with ours/theirs" should be adapted so that the respective change can also be a deletion. I remember that on a previous egit version, in a similar merge conflict state, deleting the conflicting path in Project Explorer would also stage the deletion - thus being a workaround. I cannot reproduce this behaviour with current egit.
(In reply to Vlad Gheorghe from comment #3) > I remember that on a previous egit version, in a similar merge conflict > state, deleting the conflicting path in Project Explorer would also stage > the deletion - thus being a workaround. > I cannot reproduce this behaviour with current egit. you can enable automatic staging of deletions in Preferences > Team > Git > Committing > Automatically stage files being deleted
(In reply to Matthias Sohn from comment #4) > you can enable automatic staging of deletions in > Preferences > Team > Git > Committing > Automatically stage files being > deleted I confirm that enabling this feature allows solving the conflict to "delete" by deleting the conflicting file from the Project Explorer. Maybe should be enabled by default ? There is an usability issue though, in that, as OP notices, it is hard to understand from the UI that this is a delete/modify conflict: - staging context menu "Replace with ours/theirs" - is misleading - should be adapted - chosing the deleted side (ours/theirs) has currently no effect - Merge tool - shows an empty pane for the deleted side - should maybe explicitly state that the side is deleted - Merge tool does not allow resolution to 'deleted'
EGit should be improved to support delete/modify conflicts. Auto-staging deletions is a workaround but not a proper solution. Users should be able to explicitly resolve such conflicts.
Automatic staging does not work for files that are not in Eclipse Resource model. Consider following repository structure: - plugin1 // Eclipse project - plugin2 // Eclipse project - pom.xml // composite Maven project Root directory of such repository has no .project file and is not represented in workspace. On deletion conflict, user has to: - import this folder - delete file from Project Explorer to activate auto staging - delete project from workspace (without deleting its content on filesystem, to keep plugins intact) - delete redundant .project file
Hi, I've just faced this bug and already found that it has been identified long time ago but not yet resolved. Even when there might be workarounds and I do not consider it a very serious issue, I believe it would be very nice should we have it working the "right way" so I'd like to help and contribute to get it resolved. If anyone is able to provide some guidance I'll be happy to give it a try and look into it.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/178812
*** Bug 460474 has been marked as a duplicate of this bug. ***
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/178812 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=95d93d37082bf36efb7996851636e7d77ce7b40f
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/178813 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=91406c444aa2d07c1efc329bfebf47e17e5e4bf7
*** Bug 457116 has been marked as a duplicate of this bug. ***
*** Bug 457054 has been marked as a duplicate of this bug. ***