From 3744e1e0b5d6b1118a5a7b2277346b328c79c30f Mon Sep 17 00:00:00 2001 From: Ross Smith II Date: Sat, 7 Dec 2019 12:43:22 -0800 Subject: [PATCH] Fix prompt to work where GIT_DIR is not /.git e.g., yadm uses ~/.config/yadm/repo.git --- .bash_prompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bash_prompt b/.bash_prompt index 6204f5717..9a82b29b9 100644 --- a/.bash_prompt +++ b/.bash_prompt @@ -23,7 +23,7 @@ prompt_git() { # check if the current directory is in .git before running git checks if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then - if [[ -O "$(git rev-parse --show-toplevel)/.git/index" ]]; then + if [[ -O "$(git rev-parse --git-dir)/index" ]]; then git update-index --really-refresh -q &> /dev/null; fi;