Skip to content

show an actionable dialog when files would be overwritten - #6755

Merged
shiftkey merged 7 commits into
desktop:developmentfrom
mathieudutour:f/overwritten-files-warnings
Feb 22, 2019
Merged

shiftkey merged 7 commits into
desktop:developmentfrom
mathieudutour:f/overwritten-files-warnings

Conversation

@mathieudutour

@mathieudutour mathieudutour commented Jan 31, 2019 •

Copy link
Copy Markdown
Contributor

Description

Shows an actionable dialog when files would be overwritten during a checkout. The action of the dialog is "Discard Changes and Checkout". I was also thinking about having a "Stash" action but there is no notion of stash in Desktop yet.

2019-02-19 11 15 06

image

Release notes

Notes:

  • Show an actionable dialog when files would be overwritten during a checkout

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 31, 2019
Comment thread app/src/lib/git/core.ts Resolved
@shiftkey

shiftkey commented Feb 3, 2019

Copy link
Copy Markdown
Member

@mathieudutour I think this needs a merge from development to get the fixes from #6756 and get CI working again

@iAmWillShepherd iAmWillShepherd self-assigned this Feb 5, 2019
Comment thread app/src/ui/dispatcher/error-handlers.ts Resolved

@iAmWillShepherd iAmWillShepherd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We lean on the side of explicitness so that it's clearer for all folks who peruse our codebase.

Comment thread app/src/ui/dispatcher/error-handlers.ts Resolved
Co-Authored-By: mathieudutour <[email protected]>
@iAmWillShepherd

iAmWillShepherd commented Feb 13, 2019 •

Copy link
Copy Markdown
Contributor

I am not getting the dialog with the action you noted

Reproduction steps

  1. Add new file to master
  2. Create branch, b1, based on master
  3. Checkout master
  4. Make the commit (moves master 1 commit ahead of b1)
  5. Checkout b1
  6. Add the same file
  7. Checkout master

I expected the new dialog to give me the option to discard but got the old error dialog. Here's a nice gif of it in action.

2019-02-13 09 29 48

@mathieudutour

Copy link
Copy Markdown
Contributor Author

Ah that's because of desktop/dugite#281. The proper dialog should show up when the files are already tracked and will be overwritten.

Updating the dugite dependency when it's published will take care of showing the dialog when files are untracked and will be overwritten

@shiftkey

Copy link
Copy Markdown
Member

@mathieudutour @iAmWillShepherd I have just published a new dugite release which contains that PR - https://github.com/desktop/dugite/releases/tag/v1.83.0

@shiftkey

Copy link
Copy Markdown
Member

@mathieudutour are you able to include a screenshot of the dialog in action, for reference?

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

@mathieudutour are you able to include a screenshot of the dialog in action, for reference?

Updated PR body with gif.

@mathieudutour

Copy link
Copy Markdown
Contributor Author

ah forgot about that, thanks for updating the PR!

@shiftkey shiftkey added this to the 1.6.3 milestone Feb 20, 2019
@shiftkey

Copy link
Copy Markdown
Member

@iAmWillShepherd anything in particular holding up this PR from being merged?

@shiftkey

Copy link
Copy Markdown
Member

I think this has been approved for long enough. Thanks for the contribution @mathieudutour!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants