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

check for changed files when discarding all changes #824

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

ianhi
Copy link
Collaborator

@ianhi ianhi commented Nov 12, 2020

Previously when discarding all changed files it was never checked what the names of the changed files were. This meant that open editors were not updated when the files changes. As well this led to a bug where options was referred to even when undefined.

Now we check for the changed files before doing the checkout to all us to pick up the changes in the case of discard all, and will fall back to querying the list of currently modified files if the body has no filename or branch name.

Closes: #823

attn: @lresende

Also fixes a bug where options was referred to when it was undefined.
@github-actions
Copy link

github-actions bot commented Nov 12, 2020

Binder 👈 Launch a binder notebook on branch ianhi/jupyterlab-git/fix-discard-all

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for the quick fix @ianhi

@fcollonval fcollonval merged commit 14deecd into jupyterlab:master Nov 12, 2020
@ianhi ianhi mentioned this pull request Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails to discard unstaged changes - cannot read property 'filename' of undefined
2 participants