diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-10-21 13:28:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-21 13:28:50 -0700 |
commit | 693f62ff6862b2bcee2bfba8db8d1e9196fa239c (patch) | |
tree | a27268ac4096ceec38daa196efd7946a07063e8c /contrib/completion | |
parent | 48f662dd74ed9e909a8ba878152f88a238a97b4f (diff) | |
parent | 8f7ff5b2fe7f52966c034a12cf8980dae1160222 (diff) | |
download | git-693f62ff6862b2bcee2bfba8db8d1e9196fa239c.tar.gz git-693f62ff6862b2bcee2bfba8db8d1e9196fa239c.tar.xz |
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
Diffstat (limited to 'contrib/completion')
-rw-r--r-- | contrib/completion/git-completion.bash | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index d548e99eb..8704451e5 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 } |