fix acidhub prompt to properly handle bare git repo - #12808
Open
PommeDeTerre0 wants to merge 1 commit into
Open
Conversation
krobelus
reviewed
Jun 8, 2026
| set git_branch (set_color -o blue)"$git_branch" | ||
| set -l git_status | ||
| if git rev-parse --quiet --verify HEAD >/dev/null | ||
| and not git rev-parse --is-bare-repository >/dev/null |
Contributor
There was a problem hiding this comment.
yeah this is the right spot but the fix is not quite right, since the bare status is echoed on stdout, not via the exit code. Check how fish_git_prompt does it (set -l repo_info), it's quite neat because it minimizes the Git invocations.
Author
There was a problem hiding this comment.
Oh I did not know about that, I just guessed my way into making it work by looking at how tings were done in acidhub 😅
Looks like the rest of the acidhub conditional logic around git should be upgraded to match what's done in fish_git_prompt. I'll take a look a it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12807
TODOs:
Fixes issue #<issue-number>