summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-21 20:28:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-21 20:28:50 (GMT)
commit693f62ff6862b2bcee2bfba8db8d1e9196fa239c (patch)
treea27268ac4096ceec38daa196efd7946a07063e8c
parent48f662dd74ed9e909a8ba878152f88a238a97b4f (diff)
parent8f7ff5b2fe7f52966c034a12cf8980dae1160222 (diff)
downloadgit-693f62ff6862b2bcee2bfba8db8d1e9196fa239c.zip
git-693f62ff6862b2bcee2bfba8db8d1e9196fa239c.tar.gz
git-693f62ff6862b2bcee2bfba8db8d1e9196fa239c.tar.bz2
Merge branch 'js/completion-hide-not-a-repo'
Some internal error messages leaked out of the bash completion when typing "git cmd <TAB>" and the machinery tried to complete refnames. * js/completion-hide-not-a-repo: completion: silence "fatal: Not a git repository" error
-rw-r--r--contrib/completion/git-completion.bash3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d548e99..8704451 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -384,7 +384,8 @@ __git_refs ()
;;
*)
echo "HEAD"
- git for-each-ref --format="%(refname:short)" -- "refs/remotes/$dir/" | sed -e "s#^$dir/##"
+ git for-each-ref --format="%(refname:short)" -- \
+ "refs/remotes/$dir/" 2>/dev/null | sed -e "s#^$dir/##"
;;
esac
}