summaryrefslogtreecommitdiffstats
path: root/Functions/VCS_Info
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2017-01-21 12:12:31 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2017-01-25 04:22:28 +0000
commit699a38e698d544683b6cf24843e95d25aeedebbd (patch)
tree826b290ff31f1e4024b497b3bfe6613f5a79403b /Functions/VCS_Info
parentposted: Make D07 recognize more spellings of pl_PL.UTF-8 (diff)
downloadzsh-699a38e698d544683b6cf24843e95d25aeedebbd.tar
zsh-699a38e698d544683b6cf24843e95d25aeedebbd.tar.gz
zsh-699a38e698d544683b6cf24843e95d25aeedebbd.tar.bz2
zsh-699a38e698d544683b6cf24843e95d25aeedebbd.tar.lz
zsh-699a38e698d544683b6cf24843e95d25aeedebbd.tar.xz
zsh-699a38e698d544683b6cf24843e95d25aeedebbd.tar.zst
zsh-699a38e698d544683b6cf24843e95d25aeedebbd.zip
40392: vcs_info patch2subject: Support `git show` output.
Diffstat (limited to 'Functions/VCS_Info')
-rw-r--r--Functions/VCS_Info/VCS_INFO_patch2subject17
1 files changed, 17 insertions, 0 deletions
diff --git a/Functions/VCS_Info/VCS_INFO_patch2subject b/Functions/VCS_Info/VCS_INFO_patch2subject
index 583467bc8..e222e8382 100644
--- a/Functions/VCS_Info/VCS_INFO_patch2subject
+++ b/Functions/VCS_Info/VCS_INFO_patch2subject
@@ -1,6 +1,7 @@
# This function takes as an argument a filename of a patch and sets $REPLY to
# a single-line "subject", or unsets it if no subject could be extracted.
{
+ setopt localoptions extendedglob
integer i
integer -r LIMIT=10
local -a lines
@@ -34,6 +35,22 @@
elif [[ ${lines[1]} == '# HG changeset patch' ]] && { needle=${${lines:#([#]*)}[1]}; [[ -n $needle ]] }; then
# Mercurial patch