Subject: [PATCH 1/3] _git: Improve reflog completion.
From: Daniel Shahaf <[email-masked]>
To: [email-masked]
Date: Fri, 18 Mar 2016 21:21:43 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Currently, only used by «git reflog delete <TAB>».
---
 Completion/Unix/Command/_git | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 1241058..9eeda58 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5474,10 +5474,10 @@ __git_reflog_entries () {
   local expl
   declare -a reflog_entries
 
-  reflog_entries=(${${${(f)"$(_call_program reflog-entries git reflog 2>/dev/null)"}#* }%%:*})
+  reflog_entries=(${(f)"$(_call_program reflog-entries "git reflog -1000 --pretty='%gD:[%h] %gs'" 2>/dev/null)"})
   __git_command_successful $pipestatus || return 1
 
-  _wanted reflog-entries expl 'reflog entry' _multi_parts @ reflog_entries
+  _describe -Vx -t reflog-entries 'reflog entry' reflog_entries
 }
 
 (( $+functions[__git_ref_sort_keys] )) ||