Skip to content
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

staging file after resolving merge conflicts does not warn if file is not saved #34175

Closed
doug-numetric opened this issue Sep 11, 2017 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@doug-numetric
Copy link

  • VSCode Version: Code 1.16.0 (787b31c, 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.

@vscodebot vscodebot bot added the git GIT issues label Sep 11, 2017
@joaomoreno joaomoreno added good first issue Issues identified as good for first-time contributors bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities and removed git GIT issues labels Sep 12, 2017
@joaomoreno joaomoreno added this to the Backlog milestone Sep 12, 2017
@joaomoreno joaomoreno added git GIT issues and removed new release labels Sep 12, 2017
@minoseah629
Copy link

minoseah629 commented Sep 13, 2017

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

@TheDutchCoder
Copy link

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.

@peabnuts123
Copy link

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.

@TheDutchCoder
Copy link

@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.

@doug-numetric
Copy link
Author

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.

@peabnuts123
Copy link

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.

@minoseah629
Copy link

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.

@juninho2410
Copy link

juninho2410 commented Feb 20, 2018

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

@minoseah629
Copy link

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.

@doug-numetric
Copy link
Author

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.

@peabnuts123
Copy link

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.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

6 participants