about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2015-05-13 16:08:43 +0200
committerDaniel Hahler <git@thequod.de>2015-05-18 02:48:03 +0200
commita0b221e7c587d9dfacee464bc5db367a509b7806 (patch)
tree30a6d437cf026fadfe9e42a311647fa327757e0a
parent94c6b32fe76f630f6682edb7cb8b9c0c884809a4 (diff)
downloadzsh-a0b221e7c587d9dfacee464bc5db367a509b7806.tar.gz
zsh-a0b221e7c587d9dfacee464bc5db367a509b7806.tar.xz
zsh-a0b221e7c587d9dfacee464bc5db367a509b7806.zip
35103: completion: git: add %cr to commit objects (all and recent)
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c9f6c8412..5bdb17682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,9 @@
 	* 35104: Completion/Unix/Command/_git: __git_commit_objects: query
 	1000 commits.  Also, `--all` and `--reflog` is used to get all commits.
 
+	* 35103: Completion/Unix/Command/_git: add %cr to commit objects (all
+	and recent).
+
 2015-05-16  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 35161: Completion/Unix/Command/_git: completion: git: Fix
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index f87861edb..80cbb4355 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5661,7 +5661,7 @@ __git_commit_objects () {
 
   # Note: the after-the-colon part must be unique across the entire array;
   # see workers/34768
-  : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -1000 --all --reflog --format='%h:\\\[%h\\\]\ %s')"}}
+  : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -1000 --all --reflog --format='%h:\[%h\]\ %s\ \(%cr\)')"}}
   __git_command_successful $pipestatus || return 1
 
   _describe -V -t commits 'commit object name' commits
@@ -5675,7 +5675,7 @@ __git_recent_commits () {
 
   # Careful: most %d will expand to the empty string.  Quote properly!
   # NOTE: we could use %D directly, but it's not available in git 1.9.1 at least.
-  : "${(A)commits::=${(@f)"$(_call_program commits git --no-pager log -20 --format='%h%n%d%n%s')"}}"
+  : "${(A)commits::=${(@f)"$(_call_program commits git --no-pager log -20 --format='%h%n%d%n%s\ \(%cr\)')"}}"
   __git_command_successful $pipestatus || return 1
 
   for i j k in "$commits[@]" ; do