mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
git prompt: replace question with explanation
The code in question displays GIT_DIR! if the user is inside the .git directory of a repository that has a working directory. Several git commands won't work in that situation, so it's useful to warn the user.
This commit is contained in:
parent
18e34902a5
commit
697c44a293
1 changed files with 1 additions and 1 deletions
|
@ -346,7 +346,7 @@ function __fish_git_prompt_current_branch --description "__fish_git_prompt helpe
|
|||
set branch "($branch)"
|
||||
end
|
||||
|
||||
# I honestly don't know when this is relevant
|
||||
# Let user know they're inside the git dir of a non-bare repo
|
||||
if test "true" = (git rev-parse --is-inside-git-dir ^/dev/null)
|
||||
if test "false" = (git rev-parse --is-bare-repository ^/dev/null)
|
||||
set branch "GIT_DIR!"
|
||||
|
|
Loading…
Reference in a new issue