summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-03-19 06:49:42 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-03-19 06:51:32 +0000
commite176eff554b592cd649a88cd7de23399755e43f4 (patch)
treef8767a9593b32cd4eccd9504b9b17ade2cd002bc
parentd1119bc0726ce27f9a69e2feb6b4c158ebfed8a7 (diff)
downloadzsh-e176eff554b592cd649a88cd7de23399755e43f4.tar.gz
zsh-e176eff554b592cd649a88cd7de23399755e43f4.tar.xz
zsh-e176eff554b592cd649a88cd7de23399755e43f4.zip
34739: git completion: Fix regression in ce80a92
This restores the message when completing a commit object name that
isn't one of the most recent 20 commits.  e.g., 'git checkout deadbeef<TAB>'.
-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 37d7c7962..319cbb102 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-19  Daniel Shahaf  <d.s@daniel.shahaf.name>
+
+	* 34739: Completion/Unix/Command/_git: git completion: Fix
+	regression in ce80a92 (workers/34638)
+
 2015-03-18  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 34734: Doc/Zsh/grammar.yo, Src/lex.c, Test/A02alias.ztst:
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e5639fab2..5524cb017 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5637,7 +5637,7 @@ __git_commit_objects () {
   : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}}
   __git_command_successful $pipestatus || return 1
 
-  _describe -t commits 'commit object name' commits
+  _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
 }
 
 (( $+functions[__git_recent_commits] )) ||