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 | |
parent | Merge branch 'da/mergetool-meld' (diff) | |
parent | completion: silence "fatal: Not a git repository" error (diff) | |
download | tgif-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')
-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 d548e99ebc..8704451e52 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 } |