Skip to content

"Your local changes would be overwritten by checkout" even if they wouldn't #553

@queerviolet

Description

@queerviolet
  • Extension version: master
  • VSCode Version: insiders (2018-09-25T07:23:31.537Z fe8d9d2470ddffb9dc2da604b23f5bd8a185cd66)
  • OS:macOS

Steps to Reproduce:

  1. Clone a repo with pull requests
  2. touch this_file_is_unrelated_to_anything
  3. On some PR's description page, click Checkout.

You'll see this:

screen shot 2018-10-05 at 4 49 36 pm

Which is a damned lie. The message suggests stashing, which of course doesn't help, because the files in question aren't tracked.

Another repro, arguably worse:

  1. Clone a repo with pull requests
  2. Check out a branch that has an active PR
  3. touch this_file_is_unrelated_to_anything
  4. On the description page of the PR you're already on, click Checkout.

This incarnation is particularly mind-bending (for me as a user), because to make it work, I have to because we don't have to do anything with git to satisfy the user's intent, which is entering review mode.

Anyway, when the user clicks that checkout button, we should probably just call into git and see what it says about changing branches, rather than trying to do its work for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalityux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions