From 8eccf8a6f79d5c35f7e843b74f441f1eb82bc733 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 27 Sep 2015 16:23:11 +0200 Subject: [PATCH] __fish_hg_prompt: Remove explicit root check again This doesn't add anything except slowing the function down by about 33%. Checking for a branch is just as good and that is displayed in the prompt anyway. --- share/functions/__fish_hg_prompt.fish | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/functions/__fish_hg_prompt.fish b/share/functions/__fish_hg_prompt.fish index efb7c7aaf..fa25cb353 100644 --- a/share/functions/__fish_hg_prompt.fish +++ b/share/functions/__fish_hg_prompt.fish @@ -27,12 +27,8 @@ function __fish_hg_prompt --description 'Write out the hg prompt' return 1 end - # If we're not in an hg repository, bail - if not hg root >/dev/null ^/dev/null - return 0 - end - set -l branch (hg branch ^/dev/null) + # If there's no branch, there's no repository if test -z $branch return end