mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
Mikael Magnusson: 25564: suppress error output in __git_is_treeish.
This commit is contained in:
parent
b41c26d78a
commit
ba539203f9
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 ]]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue