Skip to content

"No branch is selected, cannot push" due to bracket(s) in branch name #11997

@JeremiaAu

Description

@JeremiaAu

Environment

Installed

  • Git Extensions 5.0.0.17897
  • Build 2a3b78b
  • Git 2.46.0.windows.1
  • Microsoft Windows NT 10.0.22631.0
  • .NET 8.0.10
  • DPI 96dpi (no scaling)
  • Portable: False
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 6.0.33
    Microsoft.WindowsDesktop.App 8.0.10

Portable Canary Build

  • Git Extensions 5.1.0.17945-dhrirvrx
  • Build 5e31f51 (Dirty)
  • Git 2.46.0.windows.1
  • Microsoft Windows NT 10.0.22631.0
  • .NET 8.0.10
  • DPI 96dpi (no scaling)
  • Portable: True
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 6.0.33
    Microsoft.WindowsDesktop.App 8.0.10

Issue description

When trying to commit and push changes, the following error occurs:
Image

It is possible to push the commit by selecting a branch in the window, that pops up after the error message.
Similar to this other issue, HEAD is preselected : #11970
The thing both of our issues have in common is, that they both contain brackets in the branch name
I also have HEAD preselected when pressing the push button.

The problem only occured after I updated to version 5 of gitextensions.
I have also tried using the Canary build, as you can see in the environment section, but the issue persists.

Steps to reproduce

  1. create a new branch named "()". "(" or ")" is also possible
  2. create a empty commit for that branch (not strictly necessary)
  3. try to push that new branch to remote
    Image

Did this work in previous version of GitExtensions?

Yes, it works with the latest version 4:

  • Git Extensions 4.2.1.17611
  • Build b0c0b28
  • Git 2.46.0.windows.1
  • Microsoft Windows NT 10.0.22631.0
  • .NET 6.0.33
  • DPI 96dpi (no scaling)
  • Portable: True
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 6.0.33
    Microsoft.WindowsDesktop.App 8.0.10

Diagnostics

Command Log when using version 5.0.0.17897:

git ls-files -z --unmerged
git --no-optional-locks for-each-ref --format="%(objectname) %(refname)" refs/heads/ refs/remotes/
git remote

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions