summary refs log tree commit diff
diff options
context:
space:
mode:
-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 ]]
 }