about summary refs log tree commit diff
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
parentb41c26d78ab813debcba35478f0a97468233570c (diff)
downloadzsh-ba539203f90d1e393a7860c735e38aef4797c1de.tar.gz
zsh-ba539203f90d1e393a7860c735e38aef4797c1de.tar.xz
zsh-ba539203f90d1e393a7860c735e38aef4797c1de.zip
Mikael Magnusson: 25564: suppress error output in __git_is_treeish.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 85fd92618..d548eefae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-31  Clint Adams  <clint@zsh.org>
+
+	* Mikael Magnusson: 25564: Completion/Unix/Command/_git:
+	suppress error output in __git_is_treeish.
+
 2008-08-31  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 25570: Src/exec.c, Src/zsh.h, Test/C03traps.ztst: line numbers
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 ]]
 }