-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
stage files from merge group properly #5456
Conversation
cc @32leaves |
I could not spot any difference between the changes from here and the |
You should be able to stage from merge conflicts. On master it does not work for individual files. It can only stage from changes. |
const { repository, unstagedChanges } = this; | ||
if (unstagedChanges.some(change => change.uri === uri)) { | ||
const { repository, stagedChanges } = this; | ||
if (!stagedChanges.some(change => change.uri === uri)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should express the condition clearly; is this what you wanted to check for?
const dirty = unstagedChanges.some(change => chan`ge.uri === uri) || mergeChanges.some(change => change.uri === uri);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just tested quickly; with the proposed change I could stage changes for already staged files and it played well with the merge conflict changes.
@AlexTugarev @kittaakos please feel free to open an alternative PR, i won't be around today |
Co-authored-by: Anton Kosyakov <anton.kosyakov@typefox.io> Also-by: Anton Kosyakov <anton.kosyakov@typefox.io> Signed-off-by: Alex Tugarev <alex.tugarev@typefox.io>
@kittaakos, I've update this PR. Please have a look. |
It worked. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving this; however, I was not able to reproduce the original issue from the master
.
just had it again, pretty annoying that it is not possible to stage one file after another, merging it |
fix #5455
How to test