mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 13:37:47 +08:00
git_prompt: remove __fish_git_prompt_git_dir
It's a one line function called in a single place. I suspect it only existed because the bash equivalent __gitdir existed (it was more complex), but that function no longer exists either, as of git.git 511ad15: "bash prompt: run 'git rev-parse --git-dir' directly instead of __gitdir()"
This commit is contained in:
parent
0005702399
commit
87a0363ba7
|
@ -281,7 +281,8 @@ function __fish_git_prompt_show_upstream --description "Helper function for __fi
|
|||
end
|
||||
|
||||
function __fish_git_prompt --description "Prompt function for Git"
|
||||
set -l git_dir (__fish_git_prompt_git_dir)
|
||||
set -l git_dir (git rev-parse --git-dir ^/dev/null)
|
||||
|
||||
test -n "$git_dir"; or return
|
||||
|
||||
set -l rbc (__fish_git_prompt_operation_branch_bare $git_dir)
|
||||
|
@ -531,10 +532,6 @@ function __fish_git_prompt_operation_branch_bare --description "__fish_git_promp
|
|||
echo $bare
|
||||
end
|
||||
|
||||
function __fish_git_prompt_git_dir --description "__fish_git_prompt helper, returns .git dir if any"
|
||||
echo (git rev-parse --git-dir ^/dev/null)
|
||||
end
|
||||
|
||||
function __fish_git_prompt_set_char
|
||||
set -l user_variable_name "$argv[1]"
|
||||
set -l char $argv[2]
|
||||
|
|
Loading…
Reference in New Issue
Block a user