From 697c44a2934e7e57f7038812238a27877039ea24 Mon Sep 17 00:00:00 2001 From: Brian Gernhardt Date: Mon, 3 Jun 2013 13:04:16 -0400 Subject: [PATCH] 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. --- share/functions/__fish_git_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index a6a7c87ba..b72352ed4 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -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!"