Vscode: staging file after resolving merge conflicts does not warn if file is not saved

Created on 12 Sep 2017  Â·  11Comments  Â·  Source: microsoft/vscode

  • VSCode Version: Code 1.16.0 (787b31c0474e6165390b5a5989c9619e3e16f953, 2017-09-06T16:12:42.401Z)
  • OS Version: Darwin x64 16.7.0
  • Extensions:

Extension|Author (truncated)|Version
---|---|---
vscode-markdownlint|Dav|0.10.1
vscode-docker|Pet|0.0.16
quokka-vscode|Wal|1.0.61
vscode-eslint|dba|1.2.11
python|don|0.7.0
prettier-vscode|esb|0.23.1
MagicPython|mag|1.0.12
cpptools|ms-|0.12.3
python|tht|0.2.3
vscode-lldb|vad|0.6.1

(1 theme extensions excluded)


Steps to Reproduce:

  1. When you have merge conflicts in git, launch vscode to your git project folder
  2. Open git source control sidebar and click on file with merge conflict
  3. Resolve each of the merge conflicts (accept incoming, etc)
  4. Click on the '+' icon after the file name to stage the resolution

Expected result:
resolved file is staged

Actual result:
The resolved file was in an unsaved state so the unresolved file was staged without any warning.

bug git good first issue help wanted

Most helpful comment

my issue appears to be related to this one.

After a git merge, I go through the process of resolving the merge conflicts on an individual file.

I then save the document by using control + s.

Then when I click the Add button to commit, I get an error message saying there are merge conflicts.

This screencast demonstrates what I see.

https://www.screencast.com/t/w5l2MGx39yy

All 11 comments

my issue appears to be related to this one.

After a git merge, I go through the process of resolving the merge conflicts on an individual file.

I then save the document by using control + s.

Then when I click the Add button to commit, I get an error message saying there are merge conflicts.

This screencast demonstrates what I see.

https://www.screencast.com/t/w5l2MGx39yy

I have the exact same issue as @minoseah629

As soon as I resolve a conflict and save the file, It gives me a warning about saving with merge conflicts.

I think @minoseah629 's issue is separate and definitely needs to be created as an issue, as it is literally a bug. This issue I also strongly agree with but is more of a feature request. I frequently commit files with merge conflicts in them because of this UX issue.

@peabnuts123 I'm more than willing to create a separate issue for this, but it's not a feature, it's an actual bug ;)

Even when all merge conflicts were resolved, it still shows that message.

Yes, somehow recently the behavior changed from
a: not displaying any warning and staging the unsaved file with the merge conflicts still present
to
b: always asking the user (warning) if he wants to stage a file with merge conflicts present (even if he saved the file and there are no remaining conflicts.

I know it's a bug… that's why it should be an issue. I said it was a bug. However, it is not related to this issue, and should be tracked in a separate one.

So with the v 1.18.0, my issue of the merge conflict has been resolved. I am not sure if this original issue was resolved.

i´m having a similar issue.
I create a conflict in the same line.
After the syncronization, the editor shows the conflict. I accept one of them and save the file.
When i click in the + button, the file is added, but the editor doesn't show in the staging area.
When i try to commit, the editor says that i don't have any files to commit and if i try to syncronize, it doesn't allow because i have a merge in progress. I only can conclude if i use the terminal to make the commit manually.
I tryed several times and the error still happens. Anyone has the same issue?
image

I believe your issue is somewhat different than this issue. I would suggest making a new issue, but thats just my opinion. And since this issue is closed, microsoft would mostly likely need a new issue to work towards for a possible fix.

Yes. This issues appears to be resolved now. At least for me. I get a warning if I didn't save first. Staging just works as expected with no false warning when the merge conflicts are resolved and saved.

This issue was resolved as a part of a recent update. It's kind of unintelligent as it warns for any unsaved files in your workspace (as opposed to just ones you are staging) but it gets the job done, and I appreciate the warning.

This issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

v-pavanp picture v-pavanp  Â·  3Comments

lukehoban picture lukehoban  Â·  3Comments

VitorLuizC picture VitorLuizC  Â·  3Comments

biij5698 picture biij5698  Â·  3Comments

philipgiuliani picture philipgiuliani  Â·  3Comments