aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_git_prompt.fish
diff options
context:
space:
mode:
authorGravatar Brian Gernhardt <brian@gernhardtsoftware.com>2013-07-03 01:15:25 -0400
committerGravatar Brian Gernhardt <brian@gernhardtsoftware.com>2013-07-26 22:05:07 -0400
commit87a0363ba7d2011842cec12e3144548219b2e7e1 (patch)
tree814e3acd3389fdb0248364022d8d70db816bd44a /share/functions/__fish_git_prompt.fish
parent0005702399ac37bc97682c16ce136b063a27cc56 (diff)
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()"
Diffstat (limited to 'share/functions/__fish_git_prompt.fish')
-rw-r--r--share/functions/__fish_git_prompt.fish7
1 files changed, 2 insertions, 5 deletions
diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish
index f9101b97..948135cf 100644
--- a/share/functions/__fish_git_prompt.fish
+++ b/share/functions/__fish_git_prompt.fish
@@ -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]