diff options
Diffstat (limited to 'Functions/VCS_Info')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git index 18ba89a9a..1560d7f27 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git +++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git @@ -236,6 +236,15 @@ elif [[ -d "${gitdir}/rebase-apply" ]]; then done if [[ -f "${patchdir}/msg-clean" ]]; then subject="${$(< "${patchdir}/msg-clean")[(f)1]}" + elif [[ -f "${patchdir}/${(l:4::0:)cur}" ]]; then + local maxlines=10 line + while IFS= read -r line; do + if [[ "$line" == "Subject:"* ]]; then + subject=${line/(#s)Subject: /} + break + fi + (( --maxlines )) || break + done < "${patchdir}/${(l:4::0:)cur}" fi if [[ -f "${patchdir}/original-commit" ]]; then if [[ -n $subject ]]; then |