Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"current git branch" breaks on specific context (not standing @ HEAD) #2008

Open
FelipeLema opened this issue Jul 4, 2022 · 0 comments
Open

Comments

@FelipeLema
Copy link

Description

When standing on non-HEAD master branch, display of git branch (say my-branch) will be broken.

There are some occasions where it works (separate branch off HEAD), but problem can be reproduced.

Expected behavior

The git branch name is displayed just fine (displays [my-branch] in prompt)

Actual behavior

Displays a broken name in prompt, like ]

Steps to Reproduce

  1. Load default configuration for prezto
  2. Clone any repo ( say https://github.com/sorin-ionescu/prezto.git )
  3. access the cloned repo (cd prezto)
  4. Check the prompt displays the main branch (for prezto is [master])
  5. Stand in "not HEAD" / "one behind HEAD" (git checkout HEAD~1)
  6. Check that the display is broken (displays ])

it seems that git symbolic-ref HEAD command used for display is broken in this situation?

Versions

  • Prezto commit: 12df136
  • ZSH version: zsh 5.8.1 (x86_64-apple-darwin21.0)
  • OS information: Darwin XXXXXXXXXXXXX 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
  • git version: git version 2.32.1 (Apple Git-133)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant