zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _git: Forgot to suppress error output in __git_is_treeish().
@ 2008-08-31  6:36 Mikael Magnusson
  0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2008-08-31  6:36 UTC (permalink / raw)
  To: zsh-workers; +Cc: Clint Adams

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

---
 Completion/Unix/Command/_git |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 8416542..e513e16 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1539,7 +1539,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 ]]
 }


-- 
Mikael Magnusson

[-- Attachment #2: 0001-_git-Forgot-to-suppress-error-output-in-__git_is_tr.patch --]
[-- Type: application/octet-stream, Size: 846 bytes --]

From 563dc75aa44a3d53024586d0eb8c6e029adc6440 Mon Sep 17 00:00:00 2001
From: Mikael Magnusson <mikachu@gmail.com>
Date: Sun, 31 Aug 2008 08:34:12 +0200
Subject: [PATCH] _git: Forgot to suppress error output in __git_is_treeish().

---
 Completion/Unix/Command/_git |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 8416542..e513e16 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1539,7 +1539,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 ]]
 }
 
-- 
1.6.0.GIT


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-31  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-31  6:36 [PATCH] _git: Forgot to suppress error output in __git_is_treeish() Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).