From b59d73c039a677ac8f8d682171f8f4c4b401b812 Mon Sep 17 00:00:00 2001
From: David Paz <davidmpaz@gmail.com>
Date: Fri, 24 Feb 2017 10:12:35 +0100
Subject: Hide error when no origin in git repo

Fix git ls-remote call to match as in sugessted code for redirect
error to null.
---
 functions/vcs.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'functions')

diff --git a/functions/vcs.zsh b/functions/vcs.zsh
index 5defa9bc..c3e507b9 100644
--- a/functions/vcs.zsh
+++ b/functions/vcs.zsh
@@ -111,7 +111,7 @@ function +vi-hg-bookmarks() {
 function +vi-vcs-detect-changes() {
   if [[ "${hook_com[vcs]}" == "git" ]]; then
 
-    local remote=`git ls-remote --get-url`
+    local remote=$(git ls-remote --get-url 2> /dev/null)
     if [[ "$remote" =~ "github" ]] then
       vcs_visual_identifier='VCS_GIT_GITHUB_ICON'
     elif [[ "$remote" =~ "bitbucket" ]] then
-- 
cgit v1.2.3