coinbase/cbpay-js

### The problem

VikinoCavalier opened this issue · 0 comments

The problem

title says it mostly

Take stash for example. If any branch has a stash, the branch named stash appears as heads/stash in the branch list.
GitHub Desktop can only switch to the stash branch when it reads stash, but will land on a detached HEAD after switching to “heads/stash”.

I also found names such as upstream or existing tag names (e.g., both a v0.1 branch and a v0.1 tag) affecting.
That means using main as a tag name is playing with fire.

This problem does not affect the git commmand line – git checkout stash can return the repo (including the GitHub Desktop UI) to the real stash branch.

Release version

3.3.14-beta2, 3.3.13-beta1 (also occured before, but didn’t investigate)

Operating system

Windows 11 (x64)

Steps to reproduce the behavior for stash

  1. Create/open an empty repository
  2. Rename the default branch to stash
    • ✅ The branch list reads “Recent branches: stash
  3. Stash something (e.g, a deletion of the auto-created .gitattributes)
    • ❎ The branch list reads “Other branches: heads/stash

Log files

I read the recent entries and found nothing related to this matter.

Screenshots

image

Additional context

  • When both a stash and the stash branch exists,
    $ git checkout stash
    warning: refname 'stash' is ambiguous.
    Switched to branch 'stash'
  • Relates to #7473

This is not an April Fool’s ticket.

Originally posted by @ParadoxV5 in desktop/desktop#18395