Skip to content

"Create a branch" UI uses bad default source branch #1409

Open
@ctcjab

Description

@ctcjab

Reproduce

  1. Create a topic branch based on main / the default branch. Name it e.g. "demo-branch".
  2. Switch back to main.
  3. Delete the "demo-branch" topic branch.
  4. Try to create a new topic branch (e.g. "branch1") without clicking on "main" in the "based on" branch list. Note "main" already appears in bold, you currently have "main" checked out, "main" is the default branch, and the "Create branch" button is enabled, so it's reasonable to assume "main" will be used already, and you need not click on it.
  5. See error 'demo-branch' is not a commit and a branch 'branch1' cannot be created from it
Image

Expected behavior

  • After checking out "main" and deleting "demo-branch", the "Create a Branch" UI does not default to using the no-longer-existent "demo-branch" as the "based on" branch. Branches that no longer exist should be forgotten.
  • The "main" branch is used as the "based on" branch by default, since that is the branch that is currently checked out, and/or since it is the default branch.
  • The "Create Branch" button should not be clickable until one of the branches in the "based on" branch list is actually selected, i.e. highlighted with a blue background.

Context

Python package version: 0.51.1
Extension version: 0.51.1
Git version: 2.43.0
Operating System and its version: Ubuntu 24.04.1 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions