diff options
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | 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 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 ]] } |