about summary refs log tree commit diff
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-08-31 16:05:05 +0000
committerClint Adams <clint@users.sourceforge.net>2008-08-31 16:05:05 +0000
commitba539203f90d1e393a7860c735e38aef4797c1de (patch)
tree5a4a0d34b87320b7c336c37ddfcb814d4d3607d4 /Completion/Unix/Command/_git
parentb41c26d78ab813debcba35478f0a97468233570c (diff)
downloadzsh-ba539203f90d1e393a7860c735e38aef4797c1de.tar.gz
zsh-ba539203f90d1e393a7860c735e38aef4797c1de.tar.xz
zsh-ba539203f90d1e393a7860c735e38aef4797c1de.zip
Mikael Magnusson: 25564: suppress error output in __git_is_treeish.
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e298090b7..1ec948047 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1533,7 +1533,7 @@ __git_zstyle_default ':completion::complete:git-branch:delete-argument-rest:*' i
 (( $+functions[__git_is_treeish] )) ||
 __git_is_treeish () {
   local sha1
-  sha1="$(git rev-parse $1)"
+  sha1="$(git rev-parse $1 -- 2> /dev/null)" &&
   [[ "$(git cat-file -t "${sha1}^{tree}" 2> /dev/null)" == tree ]]
 }