From 1d5b2254988ceeca2a2a04db2e77733f265afbd2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 May 2015 15:06:05 +0200 Subject: 35100: __git_recent_commits: massage ' ->*' from heads Handle " -> master, origin/master" in decorated git-log output, and add it as separate entries. --- Completion/Unix/Command/_git | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index d9d1015c3..92835387d 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5666,6 +5666,7 @@ __git_recent_commits () { local i j k # 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')"}}" __git_command_successful $pipestatus || return 1 @@ -5674,6 +5675,7 @@ __git_recent_commits () { # see workers/34768 descr+=("$i:[$i] $k") j=${${j# \(}%\)} # strip leading ' (' and trailing ')' + j=${j/ ->/,} # Convert " -> master, origin/master". for j in ${(s:, :)j}; do if [[ $j == 'tag: '* ]] ; then tags+=( ${j#tag: } ) -- cgit 1.4.1