__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.
This commit is contained in:
Fabian Homborg 2015-09-27 16:23:11 +02:00
parent 7376639789
commit 8eccf8a6f7

View file

@ -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