-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge conflict warning when there are none #44106
Comments
To easily reproduce step 1 (tested on linux):
For (2), resolve the merge conflicts so that |
I also have the same issue unfortunately. |
Same here. When trying to stage files, VSCode claims there are conflicts when there are none. |
I'm looking into this issue: here's what I found so far. The code that displays the error is in I tested using the repro from the first comment above, and after executing, I'm guessing that the fix would involve checking if files with Status.BOTH_ADDED also had their conflicts resolved. |
The existing code only checked for conflict markers for files with BOTH_MODIFIED status; files with BOTH_ADDED status were always detected as conflicting even after conflicts are resolved. This fixes microsoft#44106.
I made a pull request that checks for conflict resolutions in files marked BOTH_ADDED. @joaomoreno Is this OK? How should I make sure that I haven't caused any regressions? Should I add a testcase for this scenario? |
The original issue is different than the issue that the rest of the discussion talks about and the PR fixes. I pushed a fix for the original issue and will review the PR. Original issue repro steps: have a conflict, resolve it and try to run Other issue repro steps: #44106 (comment) |
Issue Type
Bug
Description
Are you sure you want to stage XXX with merge conflicts?
message.(5) Is unexpected.
I've also checked that the files do not contain any
<<<
,===
,>>>
looking comments.This happens more often than not, but I have seen it stage the file without warning before. I was unable to determine what was different with this situation.
Observed on Linux, macOS and Windows.
VS Code Info
VS Code version: Code 1.20.1 (f88bbf9, 2018-02-13T15:31:21.019Z)
OS version: Linux x64 4.13.0-32-generic
System Info
The text was updated successfully, but these errors were encountered: